home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / freq_qa / crypto5.zip / CRYPTO5.TXT next >
Text File  |  1994-05-23  |  130KB  |  2,627 lines

  1. Archive-name: cryptography-faq/part01
  2. Version: 1.0
  3. Last-modified: 93/08/23
  4.  
  5.  
  6. This is the first of ten parts of the sci.crypt FAQ. The parts are
  7. mostly independent, but you should read this part before the rest. We
  8. don't have the time to send out missing parts by mail, so don't ask.
  9. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  10.  
  11. Disclaimer: This document is the product of the Crypt Cabal, a secret
  12. society which serves the National Secu---uh, no. Seriously, we're the
  13. good guys, and we've done what we can to ensure the completeness and
  14. accuracy of this document, but in a field of military and commercial
  15. importance like cryptography you have to expect that some people and
  16. organizations consider their interests more important than open
  17. scientific discussion. Trust only what you can verify firsthand.
  18. And don't sue us.
  19.  
  20. Many people have contributed to this FAQ. In alphabetical order:
  21. Eric Bach, Steve Bellovin, Dan Bernstein, Nelson Bolyard, Carl Ellison,
  22. Jim Gillogly, Mike Gleason, Doug Gwyn, Luke O'Connor, Tony Patti,
  23. William Setzer. We apologize for any omissions.
  24.  
  25. If you have suggestions, comments, or criticism, please let the current
  26. editors know by sending e-mail to crypt-comments@math.ncsu.edu. Bear in
  27. mind that this is a work in progress; there are some questions which we
  28. should add but haven't gotten around to yet. In making comments on
  29. additions it is most helpful if you are as specific as possible and 
  30. ideally even provide the actual exact text.
  31.  
  32. Archives: sci.crypt has been archived since October 1991 on
  33. ripem.msu.edu, though these archives are available only to U.S. and
  34. Canadian users. Another site is rpub.cl.msu.edu in /pub/crypt/sci.crypt/ 
  35. from Jan 1992. Please contact crypt-comments@math.ncsu.edu if you know of
  36. other archives.
  37.  
  38. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  39. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  40. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  41. sci.answers, and news.answers every 21 days.
  42.  
  43. Changes: a section at the end of this part 1 lists recent changes.  The
  44. fields `Last-Modified' and `Version' at the top of this part 1 track
  45. revisions.
  46.  
  47.  
  48. Table of Contents
  49. -----------------
  50.  
  51. 1. Overview
  52.  
  53. 2. Net Etiquette
  54. 2.1. What groups are around? What's a FAQ? Who am I? Why am I here?
  55. 2.2. Do political discussions belong in sci.crypt?
  56. 2.3. How do I present a new encryption scheme in sci.crypt?
  57.  
  58. 3. Basic Cryptology
  59. 3.1. What is cryptology? Cryptography? Plaintext? Ciphertext? Encryption? Key?
  60. 3.2. What references can I start with to learn cryptology?
  61. 3.3. How does one go about cryptanalysis?
  62. 3.4. What is a brute-force search and what is its cryptographic relevance?
  63. 3.5. What are some properties satisfied by every strong cryptosystem?
  64. 3.6. If a cryptosystem is theoretically unbreakable, then is it
  65.   guaranteed analysis-proof in practice?
  66. 3.7. Why are many people still using cryptosystems that are
  67.   relatively easy to break?
  68. 3.8. What are the basic types of cryptanalytic `attacks'?
  69.  
  70. 4. Mathematical Cryptology
  71. 4.1. In mathematical terms, what is a private-key cryptosystem?
  72. 4.2. What is an attack?
  73. 4.3. What's the advantage of formulating all this mathematically?
  74. 4.4. Why is the one-time pad secure?
  75. 4.5. What's a ciphertext-only attack?
  76. 4.6. What's a known-plaintext attack?
  77. 4.7. What's a chosen-plaintext attack?
  78. 4.8. In mathematical terms, what can you say about brute-force attacks?
  79. 4.9. What's a key-guessing attack? What's entropy?
  80.  
  81. 5. Product Ciphers
  82. 5.1. What is a product cipher?
  83. 5.2. What makes a product cipher secure?
  84. 5.3. What are some group-theoretic properties of product ciphers?
  85. 5.4. What can be proven about the security of a product cipher?
  86. 5.5. How are block ciphers used to encrypt data longer than the block size?
  87. 5.6. Can symmetric block ciphers be used for message authentication?
  88. 5.7. What exactly is DES?
  89. 5.8. What is triple DES?
  90. 5.9. What is differential cryptanalysis?
  91. 5.10. How was NSA involved in the design of DES?
  92. 5.11. Is DES available in software?
  93. 5.12. Is DES available in hardware?
  94. 5.13. Can DES be used to protect classified information?
  95. 5.14. What are ECB, CBC, CFB, and OFB encryption?
  96.  
  97. 6. Public-Key Cryptography
  98. 6.1. What is public-key cryptography?
  99. 6.2. How does public-key cryptography solve cryptography's Catch-22?
  100. 6.3. What is the role of the `trapdoor function' in public key schemes?
  101. 6.4. What is the role of the `session key' in public key schemes?
  102. 6.5. What's RSA?
  103. 6.6. Is RSA secure?
  104. 6.7. What's the difference between the RSA and Diffie-Hellman schemes?
  105. 6.8. What is `authentication' and the `key distribution problem'?
  106. 6.9. How fast can people factor numbers?
  107. 6.10. What about other public-key cryptosystems?
  108. 6.11. What is the `RSA Factoring Challenge?'
  109.  
  110. 7. Digital Signatures
  111. 7.1. What is a one-way hash function?
  112. 7.2. What is the difference between public, private, secret, shared, etc.?
  113. 7.3. What are MD4 and MD5?
  114. 7.4. What is Snefru?
  115.  
  116. 8. Technical Miscellany
  117. 8.1. How do I recover from lost passwords in WordPerfect?
  118. 8.2. How do I break a Vigenere (repeated-key) cipher?
  119. 8.3. How do I send encrypted mail under UNIX? [PGP, RIPEM, PEM, ...]
  120. 8.4. Is the UNIX crypt command secure?
  121. 8.5. How do I use compression with encryption?
  122. 8.6. Is there an unbreakable cipher?
  123. 8.7. What does ``random'' mean in cryptography?
  124. 8.8. What is the unicity point (a.k.a. unicity distance)?
  125. 8.9. What is key management and why is it important?
  126. 8.10. Can I use pseudo-random or chaotic numbers as a key stream?
  127. 8.11. What is the correct frequency list for English letters?
  128. 8.12. What is the Enigma?
  129. 8.13. How do I shuffle cards?
  130. 8.14. Can I foil S/W pirates by encrypting my CD-ROM?
  131. 8.15. Can you do automatic cryptanalysis of simple ciphers?
  132. 8.16. What is the coding system used by VCR+?
  133.  
  134. 9. Other Miscellany
  135. 9.1. What is the National Security Agency (NSA)?
  136. 9.2. What are the US export regulations?
  137. 9.3. What is TEMPEST?
  138. 9.4. What are the Beale Ciphers, and are they a hoax?
  139. 9.5. What is the American Cryptogram Association, and how do I get in touch?
  140. 9.6. Is RSA patented?
  141. 9.7. What about the Voynich manuscript?
  142.  
  143. 10. References
  144. 10.1. Books on history and classical methods
  145. 10.2. Books on modern methods
  146. 10.3. Survey articles
  147. 10.4. Reference articles
  148. 10.5. Journals, conference proceedings
  149. 10.6. Other
  150. 10.7. How may one obtain copies of FIPS and ANSI standards cited herein?
  151. 10.8. Electronic sources
  152. 10.9. RFCs (available from [FTPRF])
  153. 10.10. Related newsgroups
  154.  
  155. Changes
  156. -------
  157.  
  158. 930823 L.D.
  159.  
  160.   New sci.crypt archive site (1). NIST [FTPNS], cypherpunk FTP [FTPCP] sites 
  161.   added (10.6, 10.8), more info on security of RSA (6.3). Public key basics 
  162.   refined (6.1). RSA Factoring Challenge added (6.5). Added Changes section 
  163.   (1). Update of ACA address (9.5). C. Ellison modifications on compression 
  164.   (8.5) and attack types added (3.8). Info Security News in (10.5). New DES 
  165.   source [FTPAL].
  166.  
  167. 940111 C.E.
  168.  
  169.   Modification of triple-DES section, noting the weakness of inner loops
  170.   in composed DES (5.8); added reference to Prngxor() [FTPPX].
  171.  
  172.  
  173. ------------------------------------------------------------------------
  174. Date: 05-21-94                         Msg # 12451  
  175.   To: ALL                              Conf: (2120) news.answers
  176. From: CRYPT-COMMENTS@MATH.NCSU.        Stat: Public
  177. Subj: Cryptography FAQ (02/10:         Read: Yes
  178. ------------------------------------------------------------------------
  179.  @FROM   :CRYPT-COMMENTS@MATH.NCSU.EDU                                 
  180.  @SUBJECT:Cryptography FAQ (02/10: Net Etiquette)                      
  181.  @PACKOUT:05-21-94                                                     
  182. Message-ID: <cryptography-faq/part02_769514754@rtfm.mit.edu>
  183. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers
  184. talk.answers
  185. Organization: The Crypt Cabal
  186.  
  187. Archive-name: cryptography-faq/part02
  188. Last-modified: 93/05/04
  189.  
  190.  
  191. This is the second of ten parts of the sci.crypt FAQ. The parts are
  192. mostly independent, but you should read the first part before the rest.
  193. We don't have the time to send out missing parts by mail, so don't ask.
  194. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  195.  
  196. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  197. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  198. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  199. sci.answers, and news.answers every 21 days.
  200.  
  201.  
  202.  
  203. Contents:
  204.  
  205. 2.1. What groups are around? What's a FAQ? Who am I? Why am I here?
  206. 2.2. Do political discussions belong in sci.crypt?
  207. 2.3. How do I present a new encryption scheme in sci.crypt?
  208.  
  209.  
  210. 2.1. What groups are around? What's a FAQ? Who am I? Why am I here?
  211.  
  212.   Read news.announce.newusers and news.answers for a few weeks. Always
  213.   make sure to read a newsgroup for some time before you post to it.
  214.   You'll be amazed how often the same question can be asked in the same
  215.   newsgroup. After a month you'll have a much better sense of what the
  216.   readers want to see.
  217.  
  218. 2.2. Do political discussions belong in sci.crypt?
  219.  
  220.   No. In fact some newsgroups (notably misc.legal.computing) were
  221.   created exactly so that political questions like ``Should RSA be
  222.   patented?'' don't get in the way of technical discussions. Many
  223.   sci.crypt readers also read misc.legal.computing, comp.org.eff.talk,
  224.   comp.patents, sci.math, comp.compression, et al.; for the benefit of
  225.   people who don't care about those other topics, try to put your
  226.   postings in the right group.
  227.  
  228.   Questions about microfilm and smuggling and other non-cryptographic
  229.   ``spy stuff'' don't belong in sci.crypt either.
  230.  
  231. 2.3. How do I present a new encryption scheme in sci.crypt?
  232.  
  233.   ``I just came up with this neat method of encryption. Here's some
  234.   ciphertext: FHDSIJOYW^&%$*#@OGBUJHKFSYUIRE. Is it strong?'' Without a
  235.   doubt questions like this are the most annoying traffic on sci.crypt.
  236.  
  237.   If you have come up with an encryption scheme, providing some
  238.   ciphertext from it is not adequate. Nobody has ever been impressed by
  239.   random gibberish. Any new algorithm should be secure even if the
  240.   opponent knows the full algorithm (including how any message key is
  241.   distributed) and only the private key is kept secret. There are some
  242.   systematic and unsystematic ways to take reasonably long ciphertexts
  243.   and decrypt them even without prior knowledge of the algorithm, but
  244.   this is a time-consuming and possibly fruitless exercise which most
  245.   sci.crypt readers won't bother with.
  246.  
  247.   So what do you do if you have a new encryption scheme? First of all,
  248.   find out if it's really new. Look through this FAQ for references and
  249.   related methods. Familiarize yourself with the literature and the
  250.   introductory textbooks.
  251.  
  252.   When you can appreciate how your cryptosystem fits into the world at
  253.   large, try to break it yourself! You shouldn't waste the time of tens
  254.   of thousands of readers asking a question which you could have easily
  255.   answered on your own.
  256.  
  257.   If you really think your system is secure, and you want to get some
  258.   reassurance from experts, you might try posting full details of your
  259.   system, including working code and a solid theoretical explanation, to
  260.   sci.crypt. (Keep in mind that the export of cryptography is regulated
  261.   in some areas.)
  262.  
  263.   If you're lucky an expert might take some interest in what you posted.
  264.   You can encourage this by offering cash rewards---for instance, noted
  265.   cryptographer Ralph Merkle is offering $1000 to anyone who can break
  266.   Snefru-4---but there are no guarantees. If you don't have enough
  267.   experience, then most likely any experts who look at your system will
  268.   be able to find a flaw. If this happens, it's your responsibility to
  269.   consider the flaw and learn from it, rather than just add one more
  270.   layer of complication and come back for another round.
  271.  
  272.   A different way to get your cryptosystem reviewed is to have the NSA
  273.   look at it. A full discussion of this procedure is outside the scope
  274.   of this FAQ.
  275.  
  276.   Among professionals, a common rule of thumb is that if you want to
  277.   design a cryptosystem, you have to have experience as a cryptanalyst.
  278.  
  279.  
  280. ------------------------------------------------------------------------
  281. Date: 05-21-94                         Msg # 12452  
  282.   To: ALL                              Conf: (2120) news.answers
  283. From: CRYPT-COMMENTS@MATH.NCSU.        Stat: Public
  284. Subj: Cryptography FAQ (03/10:         Read: Yes
  285. ------------------------------------------------------------------------
  286.  @FROM   :CRYPT-COMMENTS@MATH.NCSU.EDU                                 
  287.  @SUBJECT:Cryptography FAQ (03/10: Basic Cryptology)                   
  288.  @PACKOUT:05-21-94                                                     
  289. Message-ID: <cryptography-faq/part03_769514754@rtfm.mit.edu>
  290. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers
  291. talk.answers
  292. Organization: The Crypt Cabal
  293.  
  294. Archive-name: cryptography-faq/part03
  295. Last-modified: 93/08/30
  296.  
  297.  
  298. This is the third of ten parts of the sci.crypt FAQ. The parts are
  299. mostly independent, but you should read the first part before the rest.
  300. We don't have the time to send out missing parts by mail, so don't ask.
  301. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  302.  
  303. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  304. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  305. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  306. sci.answers, and news.answers every 21 days.
  307.  
  308.  
  309. Contents:
  310.  
  311. 3.1. What is cryptology? Cryptography? Plaintext? Ciphertext? Encryption? Key?
  312. 3.2. What references can I start with to learn cryptology?
  313. 3.3. How does one go about cryptanalysis?
  314. 3.4. What is a brute-force search and what is its cryptographic relevance?
  315. 3.5. What are some properties satisfied by every strong cryptosystem?
  316. 3.6. If a cryptosystem is theoretically unbreakable, then is it
  317.   guaranteed analysis-proof in practice?
  318. 3.7. Why are many people still using cryptosystems that are
  319.   relatively easy to break?
  320. 3.8. What are the basic types of cryptanalytic `attacks'?
  321.  
  322.  
  323. 3.1. What is cryptology? Cryptography? Plaintext? Ciphertext? Encryption? Key?
  324.  
  325.   The story begins: When Julius Caesar sent messages to his trusted
  326.   acquaintances, he didn't trust the messengers. So he replaced every A
  327.   by a D, every B by a E, and so on through the alphabet. Only someone
  328.   who knew the ``shift by 3'' rule could decipher his messages.
  329.  
  330.   A cryptosystem or cipher system is a method of disguising messages so
  331.   that only certain people can see through the disguise. Cryptography is
  332.   the art of creating and using cryptosystems. Cryptanalysis is the art
  333.   of breaking cryptosystems---seeing through the disguise even when
  334.   you're not supposed to be able to. Cryptology is the study of both
  335.   cryptography and cryptanalysis.
  336.  
  337.   The original message is called a plaintext. The disguised message is
  338.   called a ciphertext. Encryption means any procedure to convert
  339.   plaintext into ciphertext. Decryption means any procedure to convert
  340.   ciphertext into plaintext.
  341.  
  342.   A cryptosystem is usually a whole collection of algorithms. The
  343.   algorithms are labelled; the labels are called keys. For instance,
  344.   Caesar probably used ``shift by n'' encryption for several different
  345.   values of n. It's natural to say that n is the key here.
  346.  
  347.   The people who are supposed to be able to see through the disguise are
  348.   called recipients. Other people are enemies, opponents, interlopers,
  349.   eavesdroppers, or third parties.
  350.  
  351. 3.2. What references can I start with to learn cryptology?
  352.  
  353.   For an introduction to technical matter, the survey articles given
  354.   in part 10 are the best place to begin as they are, in general,
  355.   concise, authored by competent people, and well written. However,
  356.   these articles are mostly concerned with cryptology as it has
  357.   developed in the last 50 years or so, and are more abstract and
  358.   mathematical than historical. The Codebreakers by Kahn [KAH67] is
  359.   encyclopedic in its history and technical detail of cryptology up
  360.   to the mid-60's.
  361.  
  362.   Introductory cryptanalysis can be learned from Gaines [GAI44] or
  363.   Sinkov [SIN66]. This is recommended especially for people who want
  364.   to devise their own encryption algorithms since it is a common
  365.   mistake to try to make a system before knowing how to break one.
  366.  
  367.   The selection of an algorithm for the DES drew the attention of
  368.   many public researchers to problems in cryptology. Consequently
  369.   several textbooks and books to serve as texts have appeared. The
  370.   book of Denning [DEN82] gives a good introduction to a broad range
  371.   of security including encryption algorithms, database security,
  372.   access control, and formal models of security. Similar comments
  373.   apply to the books of Price & Davies [PRI84] and Pfleeger [PFL89].
  374.  
  375.   The books of Konheim [KON81] and Meyer & Matyas [MEY82] are quite
  376.   technical books. Both Konheim and Meyer were directly involved in
  377.   the development of DES, and both books give a thorough analysis of
  378.   DES. Konheim's book is quite mathematical, with detailed analyses
  379.   of many classical cryptosystems. Meyer and Matyas concentrate on
  380.   modern cryptographic methods, especially pertaining to key management
  381.   and the integration of security facilities into computer systems and
  382.   networks. For more recent documentation on related areas, try
  383.   G. Simmons in [SIM91].
  384.  
  385.   The books of Rueppel [RUE86] and Koblitz [KOB89] concentrate on
  386.   the application of number theory and algebra to cryptography.
  387.  
  388. 3.3. How does one go about cryptanalysis?
  389.  
  390.   Classical cryptanalysis involves an interesting combination of
  391.   analytical reasoning, application of mathematical tools, pattern
  392.   finding, patience, determination, and luck. The best available
  393.   textbooks on the subject are the Military Cryptanalytics series
  394.   [FRIE1]. It is clear that proficiency in cryptanalysis is, for
  395.   the most part, gained through the attempted solution of given
  396.   systems. Such experience is considered so valuable that some of the
  397.   cryptanalyses performed during WWII by the Allies are still
  398.   classified.
  399.  
  400.   Modern public-key cryptanalysis may consist of factoring an integer,
  401.   or taking a discrete logarithm. These are not the traditional fare
  402.   of the cryptanalyst. Computational number theorists are some of the
  403.   most successful cryptanalysts against public key systems.
  404.  
  405. 3.4. What is a brute-force search and what is its cryptographic relevance?
  406.  
  407.   In a nutshell: If f(x) = y and you know y and can compute f, you can
  408.   find x by trying every possible x. That's brute-force search.
  409.  
  410.   Example: Say a cryptanalyst has found a plaintext and a corresponding
  411.   ciphertext, but doesn't know the key. He can simply try encrypting the
  412.   plaintext using each possible key, until the ciphertext matches---or
  413.   decrypting the ciphertext to match the plaintext, whichever is faster.
  414.   Every well-designed cryptosystem has such a large key space that this
  415.   brute-force search is impractical.
  416.     
  417.   Advances in technology sometimes change what is considered
  418.   practical. For example, DES, which has been in use for over 10 years
  419.   now, has 2^56, or about 10^17, possible keys. A computation with
  420.   this many operations was certainly unlikely for most users in the
  421.   mid-70's. The situation is very different today given the dramatic
  422.   decrease in cost per processor operation. Massively parallel
  423.   machines threaten the security of DES against brute force search.
  424.   Some scenarios are described by Garron and Outerbridge [GAR91].
  425.  
  426.   One phase of a more sophisticated cryptanalysis may involve a
  427.   brute-force search of some manageably small space of possibilities.
  428.  
  429. 3.5. What are some properties satisfied by every strong cryptosystem?
  430.  
  431.   The security of a strong system resides with the secrecy of the key
  432.   rather than with the supposed secrecy of the algorithm.
  433.  
  434.   A strong cryptosystem has a large keyspace, as mentioned above. It
  435.   has a reasonably large unicity distance; see question 8.8.
  436.  
  437.   A strong cryptosystem will certainly produce ciphertext which appears
  438.   random to all standard statistical tests (see, for example, [CAE90]).
  439.     
  440.   A strong cryptosystem will resist all known previous attacks. A
  441.   system which has never been subjected to scrutiny is suspect.
  442.  
  443.   If a system passes all the tests mentioned above, is it necessarily
  444.   strong? Certainly not. Many weak cryptosystems looked good at first.
  445.   However, sometimes it is possible to show that a cryptosystem is
  446.   strong by mathematical proof. ``If Joe can break this system, then
  447.   he can also solve the well-known difficult problem of factoring
  448.   integers.'' See part 6. Failing that, it's a crap shoot.
  449.  
  450. 3.6. If a cryptosystem is theoretically unbreakable, then is it
  451.   guaranteed analysis-proof in practice?
  452.  
  453.   Cryptanalytic methods include what is known as ``practical
  454.   cryptanalysis'': the enemy doesn't have to just stare at your
  455.   ciphertext until he figures out the plaintext. For instance, he might
  456.   assume ``cribs''---stretches of probable plaintext. If the crib is
  457.   correct then he might be able to deduce the key and then decipher the
  458.   rest of the message. Or he might exploit ``isologs''---the same
  459.   plaintext enciphered in several cryptosystems or several keys. Thus
  460.   he might obtain solutions even when cryptanalytic theory says he
  461.   doesn't have a chance.
  462.  
  463.   Sometimes, cryptosystems malfunction or are misused. The one-time pad,
  464.   for example, loses all security if it is used more than once! Even
  465.   chosen-plaintext attacks, where the enemy somehow feeds plaintext into
  466.   the encryptor until he can deduce the key, have been employed. See
  467.   [KAH67].
  468.   
  469. 3.7. Why are many people still using cryptosystems that are
  470.   relatively easy to break?
  471.  
  472.   Some don't know any better. Often amateurs think they can design
  473.   secure systems, and are not aware of what an expert cryptanalyst
  474.   could do. And sometimes there is insufficient motivation for anybody
  475.   to invest the work needed to crack a system.
  476.  
  477. 3.8. What are the basic types of cryptanalytic `attacks'?
  478.  
  479.   A standard cryptanalytic attack is to know some plaintext matching a
  480.   given piece of ciphertext and try to determine the key which maps one 
  481.   to the other.  This plaintext can be known because it is standard (a
  482.   standard greeting, a known header or trailer, ...) or because it is
  483.   guessed.  If text is guessed to be in a message, its position is probably
  484.   not known, but a message is usually short enough that the cryptanalyst
  485.   can assume the known plaintext is in each possible position and do
  486.   attacks for each case in parallel.  In this case, the known plaintext can
  487.   be something so common that it is almost guaranteed to be in a message.
  488.  
  489.   A strong encryption algorithm will be unbreakable not only under known
  490.   plaintext (assuming the enemy knows all the plaintext for a given
  491.   ciphertext) but also under "adaptive chosen plaintext" -- an attack
  492.   making life much easier for the cryptanalyst.  In this attack, the enemy
  493.   gets to choose what plaintext to use and gets to do this over and over,
  494.   choosing the plaintext for round N+1 only after analyzing the result of
  495.   round N.
  496.  
  497.   For example, as far as we know, DES is reasonably strong even under an
  498.   adaptive chosen plaintext attack (the attack Biham and Shamir used).  Of
  499.   course, we do not have access to the secrets of government cryptanalytic
  500.   services.  Still, it is the working assumption that DES is reasonably
  501.   strong under known plaintext and triple-DES is very strong under all
  502.   attacks.
  503.  
  504.   To summarize, the basic types of cryptanalytic attacks in order of
  505.   difficulty for the attacker, hardest first, are:
  506.  
  507.   cyphertext only: the attacker has only the encoded message from which 
  508.     to determine the plaintext, with no knowledge whatsoever of the
  509.     latter.
  510.  
  511.     A cyphertext only attack is usually presumed to be possible, and
  512.     a code's resistance to it is considered the basis of its 
  513.     cryptographic security.
  514.  
  515.   known plaintext: the attacker has the plaintext and corresponding 
  516.     cyphertext of an arbitrary message not of his choosing. The
  517.     particular message of the sender's is said to be `compromised'.
  518.  
  519.     In some systems, one known cyphertext-plaintext pair will 
  520.     compromise the overall system, both prior and subsequent
  521.     transmissions, and resistance to this is characteristic of a 
  522.     secure code.
  523.  
  524.   Under the following attacks, the attacker has the far less likely
  525.   or plausible ability to `trick' the sender into encrypting or 
  526.   decrypting arbitrary plaintexts or cyphertexts. Codes that resist 
  527.   these attacks are considered to have the utmost security.
  528.  
  529.   chosen plaintext: the attacker has the capability to find the 
  530.     cyphertext corresponding to an arbitrary plaintext message of his 
  531.     choosing.
  532.  
  533.   chosen cyphertext: the attacker can choose arbitrary cyphertext and
  534.     find the corresponding decrypted plaintext. This attack can show
  535.     in public key systems, where it may reveal the private key.
  536.  
  537.   adaptive chosen plaintext: the attacker can determine the cyphertext
  538.     of chosen plaintexts in an interactive or iterative process based on
  539.     previous results. This is the general name for a method of attacking 
  540.     product ciphers called `differential cryptanalysis'.
  541.  
  542.   The next part of the FAQ gives the mathematical detail behind the 
  543.   various types of cryptoanalytic attacks.
  544.  
  545.  
  546.  
  547. ------------------------------------------------------------------------
  548. Date: 05-21-94                         Msg # 12453  
  549.   To: ALL                              Conf: (2120) news.answers
  550. From: CRYPT-COMMENTS@MATH.NCSU.        Stat: Public
  551. Subj: Cryptography FAQ (04/10:         Read: Yes
  552. ------------------------------------------------------------------------
  553.  @FROM   :CRYPT-COMMENTS@MATH.NCSU.EDU                                 
  554.  @SUBJECT:Cryptography FAQ (04/10: Mathematical Cryptology)            
  555.  @PACKOUT:05-21-94                                                     
  556. Message-ID: <cryptography-faq/part04_769514754@rtfm.mit.edu>
  557. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers
  558. talk.answers
  559. Organization: The Crypt Cabal
  560.  
  561. Archive-name: cryptography-faq/part04
  562. Last-modified: 93/08/14
  563.  
  564. This is the fourth of ten parts of the sci.crypt FAQ. The parts are
  565. mostly independent, but you should read the first part before the rest.
  566. We don't have the time to send out missing parts by mail, so don't ask.
  567. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  568.  
  569. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  570. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  571. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  572. sci.answers, and news.answers every 21 days.
  573.  
  574.  
  575.  
  576. Contents:
  577.  
  578. 4.1. In mathematical terms, what is a private-key cryptosystem?
  579. 4.2. What is an attack?
  580. 4.3. What's the advantage of formulating all this mathematically?
  581. 4.4. Why is the one-time pad secure?
  582. 4.5. What's a ciphertext-only attack?
  583. 4.6. What's a known-plaintext attack?
  584. 4.7. What's a chosen-plaintext attack?
  585. 4.8. In mathematical terms, what can you say about brute-force attacks?
  586. 4.9. What's a key-guessing attack? What's entropy?
  587.  
  588.  
  589. Reader, beware: This section is highly mathematical. Well, maybe not
  590. _highly_ mathematical, but it's got a bunch of symbols and scary-looking
  591. formulas. You have been warned.
  592.  
  593.  
  594. 4.1. In mathematical terms, what is a private-key cryptosystem?
  595.  
  596.   A private-key cryptosystem consists of an encryption system E and a
  597.   decryption system D. The encryption system E is a collection of
  598.   functions E_K, indexed by ``keys'' K, mapping some set of
  599.   ``plaintexts'' P to some set of ``ciphertexts'' C. Similarly the
  600.   decryption system D is a collection of functions D_K such that
  601.   D_K(E_K(P)) = P for every plaintext P. That is, succesful decryption
  602.   of ciphertext into plaintext is accomplished using the same key
  603.   (index) as was used for the corresponding encryption of plaintext
  604.   into ciphertext. Such systems, where the same key value is used to
  605.   encrypt and decrypt, are also known as ``symmetric'' cryptoystems.
  606.  
  607. 4.2. What is an attack?
  608.  
  609.   In intuitive terms a (passive) attack on a cryptosystem is any method
  610.   of starting with some information about plaintexts and their
  611.   corresponding ciphertexts under some (unknown) key, and figuring out
  612.   more information about the plaintexts. It's possible to state
  613.   mathematically what this means. Here we go.
  614.  
  615.   Fix functions F, G, and H of n variables. Fix an encryption system E,
  616.   and fix a distribution of plaintexts and keys.
  617.  
  618.   An attack on E using G assuming F giving H with probability p is an
  619.   algorithm A with a pair f, g of inputs and one output h, such that
  620.   there is probability p of computing h = H(P_1,...,P_n), if we have
  621.   f = F(P_1,...,P_n) and g = G(E_K(P_1),...,E_K(P_n)). Note that this
  622.   probability depends on the distribution of the vector (K,P_1,...,P_n).
  623.  
  624.   The attack is trivial (or ``pointless'') if there is probability at
  625.   least p of computing h = H(P_1,...,P_n) if f = F(P_1,...,P_n) and
  626.   g = G(C_1,...,C_n). Here C_1,...,C_n range uniformly over the possible
  627.   ciphertexts, and have no particular relation to P_1,...,P_n. In other
  628.   words, an attack is trivial if it doesn't actually use the encryptions
  629.   E_K(P_1),...,E_K(P_n).
  630.  
  631.   An attack is called ``one-ciphertext'' if n = 1, ``two-ciphertext'' if
  632.   n = 2, and so on.
  633.  
  634. 4.3. What's the advantage of formulating all this mathematically?
  635.  
  636.   In basic cryptology you can never prove that a cryptosystem is secure.
  637.   Read part 3: we keep saying ``a strong cryptosystem must have this
  638.   property, but having this property is no guarantee that a cryptosystem
  639.   is strong!''
  640.  
  641.   In contrast, the purpose of mathematical cryptology is to precisely
  642.   formulate and, if possible, prove the statement that a cryptosystem is
  643.   strong. We say, for example, that a cryptosystem is secure against
  644.   all (passive) attacks if any nontrivial attack against the system (as
  645.   defined above) is too slow to be practical. If we can prove this
  646.   statement then we have confidence that our cryptosystem will resist
  647.   any (passive) cryptanalytic technique. If we can reduce this statement
  648.   to some well-known unsolved problem then we still have confidence that
  649.   the cryptosystem isn't easy to break.
  650.  
  651.   Other parts of cryptology are also amenable to mathematical
  652.   definition. Again the point is to explicitly identify what assumptions
  653.   we're making and prove that they produce the desired results. We can
  654.   figure out what it means for a particular cryptosystem to be used
  655.   properly: it just means that the assumptions are valid.
  656.  
  657.   The same methodology is useful for cryptanalysis too. The cryptanalyst
  658.   can take advantage of incorrect assumptions. Often he can try to
  659.   construct a proof of security for a system, see where the proof fails,
  660.   and use these failures as the starting points for his analysis.
  661.   
  662. 4.4. Why is the one-time pad secure?
  663.  
  664.   By definition, the one-time pad is a cryptosystem where the
  665.   plaintexts, ciphertexts, and keys are all strings (say byte strings)
  666.   of some length m, and E_K(P) is just the sum (let's say the exclusive
  667.   or) of K and P.
  668.  
  669.   It is easy to prove mathematically that there are _no_ nontrivial
  670.   single-ciphertext attacks on the one-time pad, assuming a uniform
  671.   distribution of keys. Note that we don't have to assume a uniform
  672.   distribution of plaintexts. (Here's the proof: Let A be an attack,
  673.   i.e., an algorithm taking two inputs f, g and producing one output h,
  674.   with some probability p that h = H(P) whenever f = F(P) and
  675.   g = G(E_K(P)) (i.e., g = G(K + P)). Then, because the distribution of
  676.   K is uniform and independent of P, the distribution of K + P must also
  677.   be uniform and independent of P. But also the distribution of C is
  678.   uniform and independent of P. Hence there is probability exactly p
  679.   that h = H(P) whenever f = F(P) and g = G(C), over all P and C. Thus
  680.   a fortiori A is trivial.)
  681.  
  682.   On the other hand the one-time pad is _not_ secure if a key K is used
  683.   for more than one plaintext: i.e., there are nontrivial
  684.   multiple-ciphertext attacks. So to be properly used a key K must be
  685.   thrown away after one encryption. The key is also called a ``pad'';
  686.   this explains the name ``one-time pad.''
  687.  
  688.   Also, a computer-based pseudo-random number generator does _not_ 
  689.   qualify as a true one-time pad because of its deterministic 
  690.   properties. See `pseudo-random number generators as key stream'.
  691.  
  692. 4.5. What's a ciphertext-only attack?
  693.  
  694.   In the notation above, a ciphertext-only attack is one where F is
  695.   constant. Given only some information G(E_K(P_1),...,E_K(P_n)) about
  696.   n ciphertexts, the attack has to have some chance of producing some
  697.   information H(P_1,...,P_n) about the plaintexts. The attack is trivial
  698.   if it has just as good a chance of producing H(P_1,...,P_n) when given
  699.   G(C_1,...,C_n) for random C_1,...,C_n.
  700.  
  701.   For example, say G(C) = C, and say H(P) is the first bit of P. We can
  702.   easily write down an attack---the ``guessing attack,'' which simply
  703.   guesses that H(P) is 1. This attack is trivial because it doesn't use
  704.   the ciphertext: it has a fifty-fifty chance of guessing correctly no
  705.   matter what. On the other hand there is an attack on RSA which
  706.   produces one bit of information about P, with 100% success, using C.
  707.   If it is fed a random C then the success rate drops to 50%. So this is
  708.   a nontrivial attack.
  709.  
  710. 4.6. What's a known-plaintext attack?
  711.  
  712.   The classic known-plaintext attack has F(P_1,P_2) = P_1,
  713.   G(C_1,C_2) = (C_1,C_2), and H(P_1,P_2) depending only on P_2.
  714.   In other words, given two ciphertexts C_1 and C_2 and one decryption
  715.   P_1, the known-plaintext attack should produce information about the
  716.   other decryption P_2.
  717.  
  718.   Note that known-plaintext attacks are often defined in the literature
  719.   as producing information about the key, but this is pointless: the
  720.   cryptanalyst generally cares about the key only insofar as it lets him
  721.   decrypt further messages.
  722.  
  723. 4.7. What's a chosen-plaintext attack?
  724.  
  725.   A chosen-plaintext attack is the first of an increasingly impractical
  726.   series of _active_ attacks on a cryptosystem: attacks where the
  727.   cryptanalyst feeds data to the encryptor. These attacks don't fit into
  728.   our model of passive attacks explained above. Anyway, a
  729.   chosen-plaintext attack lets the cryptanalyst choose a plaintext and
  730.   look at the corresponding ciphertext, then repeat until he has figured
  731.   out how to decrypt any message. More absurd examples of this sort of
  732.   attack are the ``chosen-key attack'' and ``chosen-system attack.''
  733.  
  734.   A much more important form of active attack is a message corruption
  735.   attack, where the attacker tries to change the ciphertext in such a
  736.   way as to make a useful change in the plaintext.
  737.  
  738.   There are many easy ways to throw kinks into all of these attacks:
  739.   for instance, automatically encrypting any plaintext P as
  740.   T,E_K(h(T+R+P),R,P), where T is a time-key (sequence number) chosen anew
  741.   for each message, R is a random number, and h is a one-way hash
  742.   function. Here comma means concatenation and plus means exclusive-or.
  743.  
  744. 4.8. In mathematical terms, what can you say about brute-force attacks?
  745.  
  746.   Consider the following known-plaintext attack. We are given some
  747.   plaintexts P_1,...,P_{n-1} and ciphertexts C_1,...,C_{n-1}. We're
  748.   also given a ciphertext C_n. We run through every key K. When we find
  749.   K such that E_K(P_i) = C_i for every i < n, we print D_K(C_n).
  750.  
  751.   If n is big enough that only one key works, this attack will succeed
  752.   on valid inputs all the time, while it will produce correct results
  753.   only once in a blue moon for random inputs. Thus this is a nontrivial
  754.   attack. Its only problem is that it is very slow if there are many
  755.   possible keys.
  756.  
  757. 4.9. What's a key-guessing attack? What's entropy?
  758.  
  759.   Say somebody is using the one-time pad---but isn't choosing keys
  760.   randomly and uniformly from all m-bit messages, as he was supposed to
  761.   for our security proof. In fact say he's known to prefer keys which
  762.   are English words. Then a cryptanalyst can run through all English
  763.   words as possible keys. This attack will often succeed, and it's much
  764.   faster than a brute-force search of the entire keyspace.
  765.  
  766.   We can measure how bad a key distribution is by calculating its
  767.   entropy. This number E is the number of ``real bits of information''
  768.   of the key: a cryptanalyst will typically happen across the key within
  769.   2^E guesses. E is defined as the sum of -p_K log_2 p_K, where p_K is
  770.   the probability of key K.
  771.  
  772.  
  773. ------------------------------------------------------------------------
  774. Date: 05-21-94                         Msg # 12454  
  775.   To: ALL                              Conf: (2120) news.answers
  776. From: CRYPT-COMMENTS@MATH.NCSU.        Stat: Public
  777. Subj: Cryptography FAQ (05/10:         Read: Yes
  778. ------------------------------------------------------------------------
  779.  @FROM   :CRYPT-COMMENTS@MATH.NCSU.EDU                                 
  780.  @SUBJECT:Cryptography FAQ (05/10: Product Ciphers)                    
  781.  @PACKOUT:05-21-94                                                     
  782. Message-ID: <cryptography-faq/part05_769514754@rtfm.mit.edu>
  783. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers
  784. talk.answers
  785. Organization: The Crypt Cabal
  786.  
  787. Archive-name: cryptography-faq/part05
  788. Last-modified: 93/08/14
  789.  
  790.  
  791. This is the fifth of ten parts of the sci.crypt FAQ. The parts are
  792. mostly independent, but you should read the first part before the rest.
  793. We don't have the time to send out missing parts by mail, so don't ask.
  794. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  795.  
  796. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  797. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  798. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  799. sci.answers, and news.answers every 21 days.
  800.  
  801.  
  802.  
  803. Contents:
  804.  
  805. 5.1. What is a product cipher?
  806. 5.2. What makes a product cipher secure?
  807. 5.3. What are some group-theoretic properties of product ciphers?
  808. 5.4. What can be proven about the security of a product cipher?
  809. 5.5. How are block ciphers used to encrypt data longer than the block size?
  810. 5.6. Can symmetric block ciphers be used for message authentication?
  811. 5.7. What exactly is DES?
  812. 5.8. What is triple DES?
  813. 5.9. What is differential cryptanalysis?
  814. 5.10. How was NSA involved in the design of DES?
  815. 5.11. Is DES available in software?
  816. 5.12. Is DES available in hardware?
  817. 5.13. Can DES be used to protect classified information?
  818. 5.14. What are ECB, CBC, CFB, OFB, and PCBC encryption?
  819.  
  820.  
  821. 5.1. What is a product cipher?
  822.  
  823.   A product cipher is a block cipher that iterates several weak
  824.   operations such as substitution, transposition, modular
  825.   addition/multiplication, and linear transformation. (A ``block
  826.   cipher'' just means a cipher that encrypts a block of data---8 bytes,
  827.   say---all at once, then goes on to the next block.) The notion of
  828.   product ciphers is due to Shannon [SHA49]. Examples of modern
  829.   product ciphers include LUCIFER [SOR84], DES [NBS77], SP-networks
  830.   [KAM78], LOKI [BRO90], FEAL [SHI84], PES [LAI90], Khufu and Khafre
  831.   [ME91a]. The so-called Feistel ciphers are a class of product
  832.   ciphers which operate on one half of the ciphertext at each round,
  833.   and then swap the ciphertext halves after each round. LUCIFER,
  834.   DES, LOKI, and FEAL are examples of Feistel ciphers.
  835.  
  836.   The following table compares the main parameters of several product 
  837.   ciphers:
  838.  
  839.   cipher   |   block length   |   key bits   |   number of rounds
  840.   LUCIFER          128               128                16
  841.   DES               64                56                16
  842.   LOKI              64                64                16
  843.   FEAL              64               128            2^x, x >= 5
  844.   PES               64               128                 8
  845.  
  846. 5.2. What makes a product cipher secure?
  847.  
  848.   Nobody knows how to prove mathematically that a product cipher is
  849.   completely secure. So in practice one begins by demonstrating that the
  850.   cipher ``looks highly random''. For example, the cipher must be
  851.   nonlinear, and it must produce ciphertext which functionally depends
  852.   on every bit of the plaintext and the key. Meyer [MEY78] has shown
  853.   that at least 5 rounds of DES are required to guarantee such a
  854.   dependence. In this sense a product cipher should act as a ``mixing''
  855.   function which combines the plaintext, key, and ciphertext in a
  856.   complex nonlinear fashion.
  857.  
  858.   The fixed per-round substitutions of the product cipher are
  859.   referred to as S-boxes. For example, LUCIFER has 2 S-boxes, and DES
  860.   has 8 S-boxes. The nonlinearity of a product cipher reduces to a
  861.   careful design of these S-boxes. A list of partial design criteria
  862.   for the S-boxes of DES, which apply to S-boxes in general, may be
  863.   found in Brown [BRO89] and Brickell et al. [BRI86].
  864.  
  865. 5.3. What are some group-theoretic properties of product ciphers?
  866.  
  867.   Let E be a product cipher that maps N-bit blocks to N-bit blocks.
  868.   Let E_K(X) be the encryption of X under key K. Then, for any fixed K,
  869.   the map sending X to E_K(X) is a permutation of the set of N-bit
  870.   blocks. Denote this permutation by P_K. The set of all N-bit
  871.   permutations is called the symmetric group and is written S_{2^N}.
  872.   The collection of all these permutations P_K, where K ranges over all
  873.   possible keys, is denoted E(S_{2^N}). If E were a random mapping from
  874.   plaintexts to ciphertexts then we would expect E(S_{2^N}) to generate
  875.   a large subset of S_{2^N}.
  876.  
  877.   Coppersmith and Grossman [COP74] have shown that a very simple
  878.   product cipher can generate the alternating group A_{2^N} given a
  879.   sufficient number of rounds. (The alternating group is half of the
  880.   symmetric group: it consists of all ``even'' permutations, i.e., all
  881.   permutations which can be written as an even number of swaps.)
  882.   Even and Goldreich [EVE83] were able to extend these results to show
  883.   that Feistel ciphers can generate A_{2^N}, given a sufficient number
  884.   of rounds.
  885.  
  886.   The security of multiple encipherment also depends on the
  887.   group-theoretic properties of a cipher. Multiple encipherment is an
  888.   extension over single encipherment if for keys K1, K2 there does
  889.   not exist a third key K3 such that
  890.  
  891.   E_K2(E_K1(X)) == E_(K3)(X)                (**)
  892.  
  893.   which indicates that encrypting twice with two independent keys
  894.   K1, K2 is equal to a single encryption under the third key K3. If
  895.   for every K1, K2 there exists a K3 such that eq. (**) is true then
  896.   we say that E is a group.
  897.  
  898.   This question of whether DES is a group under this definition was
  899.   extensively studied by Sherman, Kaliski, and Rivest [SHE88]. In their
  900.   paper they give strong evidence for the hypothesis that DES is not a
  901.   group. In fact DES is not a group [CAM93].
  902.  
  903. 5.4. What can be proven about the security of a product cipher?
  904.  
  905.   Recall from above that P_K is a permutation produced by E under
  906.   some key K. The goal of the designer of E is to ensure that P_K
  907.   appears to be a random element of S_{2^N}, the symmetric group.
  908.   Let R be an element of S_{2^N} selected randomly. We will say that P_K
  909.   and R are indistinguishable if an observer given P_K and R in some
  910.   order cannot distinguish between these two permutations in polynomial
  911.   time. That is, with time bounded resources, the observer cannot
  912.   determine which of the permutations is produced by E: the optimal
  913.   decision is no better than simply guessing.
  914.  
  915.   Luby and Rackoff [LUB88] have shown that a class of Feistel ciphers
  916.   are secure in this sense when the round mapping is replaced by
  917.   random boolean functions.
  918.  
  919. 5.5. How are block ciphers used to encrypt data longer than the block size?
  920.  
  921.   There are four standard ``modes of operation'' (and numerous non-standard
  922.   ones as well). The standard modes of operation are defined in the U.S.
  923.   Department of Commerce Federal Information Processing Standard (FIPS) 81,
  924.   published in 1980. See the question about ECB below for more details.
  925.  
  926.   Although they are defined for the DES block cipher, the ``modes of
  927.   operation'' can be used with any block cipher.
  928.  
  929. 5.6. Can symmetric block ciphers be used for message authentication?
  930.  
  931.   You may use a symmetric cryptosystem block cipher to prove to yourself
  932.   that you generated a message, and that the message wasn't altered
  933.   after you created it. But you cannot prove these things to anyone else
  934.   without revealing your key. Thereafter you cannot prove anything about
  935.   messages authenticated with that key.
  936.   
  937.   See ANSI X3.106-1983 and FIPS 113 (1985) for a standard method of message
  938.   authentication using DES.
  939.  
  940. 5.7. What exactly is DES?
  941.  
  942.   DES is the U.S. Government's Data Encryption Standard, a product 
  943.   cipher that operates on 64-bit blocks of data, using a 56-bit key. 
  944.  
  945.   It is defined in FIPS 46-1 (1988) [which supersedes FIPS 46 (1977)].
  946.   FIPS are Federal Information Processing Standards published by NTIS.
  947.   DES is identical to the ANSI standard Data Encryption Algorithm (DEA)
  948.   defined in ANSI X3.92-1981. 
  949.  
  950. 5.8. What is triple DES?
  951.  
  952.   Triple DES is a product cipher which, like DES, operates on 64-bit 
  953.   data blocks. There are several forms, each of which uses the DES
  954.   cipher 3 times. Some forms use two 56-bit keys, some use three.
  955.   The DES ``modes of operation'' may also be used with triple-DES.
  956.  
  957.   Some people refer to E(K1,D(K2,E(K1,x))) as triple-DES.
  958.  
  959.   This method is defined in chapter 7.2 of the ANSI standard X9.17-1985
  960.   ``Financial Institution Key Management'' and is intended for use in
  961.   encrypting DES keys and IVs for ``Automated Key Distribution''. Its
  962.   formal name is ``Encryption and Decryption of a Single Key by a Key
  963.   Pair'', but it is referenced in other standards documents as EDE.
  964.  
  965.   That standard says (section 7.2.1): ``Key encrypting keys may be a single
  966.   DEA key or a DEA key pair. Key pairs shoud be used where additional
  967.   security is needed (e.g., the data protected by the key(s) has a long
  968.   security life). A key pair shall not be encrypted or decrypted using a
  969.   single key.''
  970.  
  971.   Others use the term ``triple-DES'' for E(K1,D(K2,E(K3,x))) or
  972.   E(K1,E(K2,E(K3,x))).
  973.  
  974.   All of these methods are defined only for ECB mode of operation.  The
  975.   security of various methods of achieving other modes of operation (such as
  976.   CBC) is under study at the moment.  For now, it should be assumed that
  977.   other modes be defined as they are today, but with E(K1,D(K2,E(K1,x))) as
  978.   the block cipher within the feedback mechanism creating the mode.
  979.  
  980.   One of us (Ellison) has long advocated triple DES use in the form
  981.  
  982.     E(K1, Tran( E(K2, Tran( E(K3, Compress( x )))))),
  983.  
  984.   where each DES instance has its own key and IV (for CBC mode) and Tran is
  985.   a large-block transposition program. Tran is available from [FTPTR].  This
  986.   claims to gain security by diffusing single bit changes over a much larger
  987.   block (Tran's block size).  Other compositions of weak ciphers with DES
  988.   are possible.  For example, one could use:
  989.  
  990.    E(K1, Prngxor(K4, Tran( E(K2, Tran( Prngxor(K5, E(K3, Compress( x )))))))),
  991.  
  992.   where Prngxor() [FTPPX] is a simple stream cipher driven from a long-period
  993.   pseudo-random number generator (PRNG), to make sure that all plaintext or
  994.   ciphertext patterns are hidden while permitting the use of ECB mode for DES
  995.   (since there are certain weaknesses in the use of inner CBC loops for
  996.   multiple-DES, under some attacks, and we do not yet know if these show up
  997.   under composition with Tran()).
  998.  
  999. 5.9. What is differential cryptanalysis?
  1000.  
  1001.   Differential cryptanalysis is a statistical attack that can be
  1002.   applied to any iterated mapping (i.e., any mapping which is based on
  1003.   a repeated round function). The method was recently popularized by
  1004.   Biham and Shamir [BIH91], but Coppersmith has remarked that the
  1005.   S-boxes of DES were optimized against this attack some 20 years ago.
  1006.   This method has proved effective against several product ciphers,
  1007.   notably FEAL [BI91a].
  1008.  
  1009.   Differential cryptanalysis is based on observing a large number of
  1010.   ciphertexts Y, Y' whose corresponding plaintexts X, X' satisfy a
  1011.   known difference D = X+X', where + is componentwise XOR. In the
  1012.   basic Biham-Shamir attack, 2^{47} such plaintext pairs are required
  1013.   to determine the key for DES. Substantially fewer pairs are required
  1014.   if DES is truncated to 6 or 8 rounds. In these cases, the actual key
  1015.   can be recovered in a matter of minutes using a few thousand pairs.
  1016.   For full DES this attack is impractical because it requires so many
  1017.   known plaintexts.
  1018.  
  1019.   The work of Biham and Shamir on DES revealed several startling
  1020.   observations on the algorithm. Most importantly, if the key
  1021.   schedule was removed from DES and a 16*48 = 768-bit key was used,
  1022.   the key could be recovered in less than 2^{64} steps. Thus
  1023.   independent subkeys do not add substantial security to DES.
  1024.   Further, the S-boxes of DES are extremely sensitive in that
  1025.   changing even single entries in these tables yields significant
  1026.   improvement in the differential attack.
  1027.  
  1028.   Adi Shamir is quoted to say (NYTimes Oct 13 1991), ``I would say
  1029.   that, contrary to what some people believe, there is no evidence
  1030.   of tampering with the DES so that the basic design was weakened.''
  1031.  
  1032. 5.10. How was NSA involved in the design of DES?
  1033.  
  1034.   According to Kinnucan [KIN78], Tuchman, a member of the group that
  1035.   developed DES at IBM is quoted as saying, ``We developed the DES
  1036.   algorithm entirely within IBM using IBMers. The NSA did not
  1037.   dictate a single wire!'' Tuchman and Meyer (another developer of
  1038.   DES) spent a year breaking ciphers and finding weaknesses in
  1039.   Lucifer. They then spent two years strengthening Lucifer. ``Their
  1040.   basic approach was to look for strong substitution, permutation,
  1041.   and key scheduling functions ... IBM has classified the notes
  1042.   containing the selection criteria at the request of the NSA....
  1043.   `The NSA told us we had inadvertently reinvented some of the deep
  1044.   secrets it uses to make its own algorithms,' explains Tuchman.''
  1045.   
  1046.   On the other hand, a document called ``Involvement of the NSA in
  1047.   the development of DES: unclassified summary of the United States
  1048.   Select Committee on Intelligence'', printed in the IEEE
  1049.   Communications Magazine, p53-55, 1978, states: ``In the development
  1050.   of DES, NSA convinced IBM that a reduced keysize was sufficient;
  1051.   indirectly assisted in the development of the S-box structures; and
  1052.   certified that the final DES algorithm was, to the best of their
  1053.   knowledge, free from any statistical or mathematical weakness.''
  1054.  
  1055.   Clearly the key size was reduced at the insistence of the NSA.
  1056.   The article further states that the NSA did not tamper with the
  1057.   algorithm itself, just the parameters, which in some sense
  1058.   resolves the apparent conflict in the remarks of Meyer and Tuchman
  1059.   presented above.
  1060.  
  1061. 5.11. Is DES available in software?
  1062.  
  1063.   Several people have made DES code available via ftp (see part 10 for
  1064.   pathnames): Stig Ostholm [FTPSO]; BSD [FTPBK]; Eric Young [FTPEY];
  1065.   Dennis Furguson [FTPDF]; Mark Riordan [FTPMR]; Phil Karn [FTPPK].
  1066.   A Pascal listing of DES is also given in Patterson [PAT87]. Antti 
  1067.   Louko <alo@kampi.hut.fi> has written a version of DES with BigNum
  1068.   packages in [FTPAL].
  1069.  
  1070.   FIPS 46-1 says ``The algorithm specified in this standard is to be
  1071.   implemented ... using hardware (not software) technology. ...
  1072.   Software implementations in general purpose computers are not in
  1073.   compliance with this standard.''  Despite this, software
  1074.   implementations abound, and are used by government agencies.
  1075.  
  1076. 5.12. Is DES available in hardware?
  1077.  
  1078.   The following paragraphs are quoted from messages sent to the editors.
  1079.   We don't vouch for the quality or even existence of the products.
  1080.  
  1081.   Chip Rosenthal says: ``Dallas Semiconductor makes a DES
  1082.   encryption/decryption device for use on standard, digital 64Kbps PCM
  1083.   telecom data streams. It is capable of processing data in real time,
  1084.   e.g. one sample/frame. It is the DS2160. Their phone number is
  1085.   214-450-0400. You would probably need to talk with Dewight in Telecom
  1086.   marketing.''
  1087.  
  1088.   Christian Franke, franke@informatik.rwth-aachen.de, says: ``1.
  1089.   Cryptech CRY12C102: 22.5Mbit/s according to Data Sheet, with 32 Bit
  1090.   interface. We use this one, because it was the only one available when
  1091.   we started the project. No problems !  2. Pijnenburg PCC100: 20Mbit/s
  1092.   according to Data Sheet. Address: PIJNENBURG B.V., Boxtelswweg 26,
  1093.   NL-5261 NE Vught, The Netherlands. 3. INFOSYS DES Chip (Germany):
  1094.   S-Boxes must be loaded by software. So you can modify the Algorithm.
  1095.   Sorry, I don't have the data sheet handy. Please E-Mail me if you need
  1096.   further information.''
  1097.  
  1098.   Marcus J Ranum, mjr@tis.com, says: ``SuperCrypt'' 100Mb/sec and faster
  1099.   DES and Proprietary Storage for 16 56-bit keys Key stream generator
  1100.   Integrated hardware DES3 procedure Extended mode with 112 bit keys;
  1101.   Computer Elektronik Infosys; 512-A Herndon Parkway,; Herndon, VA
  1102.   22070; 800-322-3464.
  1103.  
  1104.   Tim Hember, thember@gandalf.ca, says: Newbridge Microsystems sells
  1105.   an AM9568 compatible DES chip that operates at 25MHz, performs a
  1106.   round of encryption in 18 clocks, has a three-stage pipeline,
  1107.   supports ECB, CBC, CFB-8 and >>> CFB-1 <<<<. Further it is very
  1108.   reasonable priced as opposed to other high-end DES chips. Call
  1109.   Newbridge Microsystems, Ottawa, 613-592-0714. (... there are no
  1110.   import/export issues with Canada and the US). If you require custom
  1111.   DES or Public Key ICs then Timestep Engineering developed
  1112.   Newbridge's crypto chips and ICs for other commercial and
  1113.   educational establishments. They can be reached at 613-820-0024.
  1114.  
  1115. 5.13. Can DES be used to protect classified information?
  1116.  
  1117.   DES is not intended to protect classified data. FIPS 46-1 says:
  1118.   ``This standard will be used by Federal departments and agencies for
  1119.   the cryptographic protection of computer data when the following
  1120.   conditions apply: 1. ... cryptographic protection is required; and
  1121.   2. the data is not classified according to the National Security Act
  1122.   of 1947, as amended, or the Atomic Energy Act of 1954, as amended.''
  1123.  
  1124. 5.14. What are ECB, CBC, CFB, OFB, and PCBC encryption?
  1125.  
  1126.   These are methods for using block ciphers, such as DES, to encrypt 
  1127.   messages, files, and blocks of data, known as ``modes of operation.''
  1128.   Four ``modes of operation'' are defined in FIPS 81 (1980 December 2), 
  1129.   and also in ANSI X3.106-1983. 
  1130.  
  1131.   FIPS 81 specifies that when 7-bit ASCII data is sent in octets, the
  1132.   unused most-significant bit is to be set to 1.
  1133.  
  1134.   FIPS 81 also specifies the padding for short blocks.
  1135.  
  1136.   The four FIPS/ANSI standard DES modes of operation are: 
  1137.         Electronic Code Book  (ECB), 
  1138.         Cipher Block Chaining (CBC), 
  1139.         K-bit Cipher FeedBack (CFB), and 
  1140.         K-bit Output FeedBack (OFB).
  1141.  
  1142.   All four of the ANSI/FIPS modes have very little "error extension".
  1143.   For a single bit error in the cipherstream, none of them produce an
  1144.   error burst in the decrypted output stream of longer than 128 bits.
  1145.  
  1146.   A fifth mode of operation, used in Kerberos and elsewhere but not
  1147.   defined in any standard, is error-Propagating Cipher Block Chaining 
  1148.   (PCBC).  Unlike the 4 standard modes, PCBC extends or propagates the
  1149.   effect of a single bit error in the cipherstream throughout remainder 
  1150.   of the decrypted textstream after the point of error.
  1151.  
  1152.   These 5 methods are explained below in a C-language-like notation.
  1153.  
  1154.   Some symbols:
  1155.  
  1156.   P[n]  The n'th block of plaintext, input to encryption, output from
  1157.         decryption. Size of block determined by the mode.
  1158.  
  1159.   C[n]  The n'th block of ciphertext, output from encryption, input to
  1160.         decryption. Size of block determined by the mode.
  1161.  
  1162.   E(m)  The DES encryption function, performed on 64-bit block m, using
  1163.         the 16-key schedule derived from some 56-bit key.
  1164.  
  1165.   D(m)  The DES decryption function, performed on 64-bit block m, using
  1166.         the same key schedule as in E(m), except that the 16 keys
  1167.         in the schedule are used in the opposite order as in E(m).
  1168.  
  1169.   IV    A 64-bit ``initialization vector'', a secret value which, along with
  1170.         the key, is shared by both encryptor and decryptor.
  1171.  
  1172.   I[n]  The n'th value of a 64-bit variable, used in some modes.
  1173.   R[n]  The n'th value of a 64-bit variable, used in some modes.
  1174.  
  1175.   LSB(m,k) The k least significant (right-most) bits of m.
  1176.         e.g. m & ((1 << k) - 1)
  1177.  
  1178.   MSB(m,k) The k most significant (left-most) bits of m.
  1179.         e.g. (m >> (64-k)) & ((1 << k) - 1)
  1180.  
  1181.   = ^ << >> &  operators as defined in the c langage.
  1182.  
  1183.  
  1184.   Electronic Code Book (ECB):
  1185.  
  1186.           P[n] and C[n] are each 64-bits long.
  1187.  
  1188.           Encryption:                   Decryption:
  1189.           C[n] = E(P[n])                P[n] = D(C[n])
  1190.  
  1191.  
  1192.   Cipher Block Chaining (CBC):
  1193.  
  1194.           P[n] and C[n] are each 64-bits long.
  1195.  
  1196.           Encryption:                   Decryption:
  1197.           C[0] = E(P[0]^IV)             P[0] = D(C[0])^IV
  1198.   (n>0)   C[n] = E(P[n]^C[n-1])         P[n] = D(C[n])^C[n-1]
  1199.  
  1200.  
  1201.   Propagating Cipher Block Chaining (PCBC):
  1202.  
  1203.           P[n] and C[n] are each 64-bits long.
  1204.  
  1205.           Encryption:                   Decryption:
  1206.           C[0] = E(P[0]^IV)             P[0] = D(C[0])^IV
  1207.   (n>0)   C[n] = E(P[n]^P[n-1]^C[n-1])  P[n] = D(C[n])^P[n-1]^C[n-1]
  1208.  
  1209.  
  1210.   k-bit Cipher FeedBack (CFB):
  1211.  
  1212.           P[n] and C[n] are each k bits long, 1 <= k <= 64. 
  1213.  
  1214.           Encryption:                   Decryption:
  1215.           I[0] = IV                     I[0] = IV
  1216.   (n>0)   I[n] = I[n-1]<<k | C[n-1]     I[n] = I[n-1]<<k | C[n-1]       
  1217.   (all n) R[n] = MSB(E(I[n]),k)         R[n] = MSB(E(I[n]),k)
  1218.   (all n) C[n] = P[n]^R[n]              P[n] = C[n]^R[n]
  1219.  
  1220.           Note that for k==64, this reduces to:
  1221.  
  1222.           I[0] = IV                     I[0] = IV
  1223.   (n>0)   I[n] = C[n-1]                 I[n] = C[n-1]   
  1224.   (all n) R[n] = E(I[n])                R[n] = E(I[n])
  1225.   (all n) C[n] = P[n]^R[n]              P[n] = C[n]^R[n]
  1226.  
  1227.   CFB notes: Since I[n] depends only on the plain or cipher text from the
  1228.   previous operation, the E() function can be performed in parallel with
  1229.   the reception of the text with which it is used.
  1230.  
  1231.  
  1232.   k-bit Output FeedBack (OFB):
  1233.  
  1234.           P[n] and C[n] are each k bits long, 1 <= k <= 64. 
  1235.  
  1236.           Encryption:                   Decryption:
  1237.           I[0] = IV                     I[0] = IV
  1238.   (n>0)   I[n] = I[n-1]<<k | R[n-1]     I[n] = I[n-1]<<k | R[n-1]       
  1239.   (all n) R[n] = MSB(E(I[n]),k)         R[n] = MSB(E(I[n]),k)
  1240.   (all n) C[n] = P[n]^R[n]              P[n] = C[n]^R[n]
  1241.  
  1242.           Note that for k==64, this reduces to:
  1243.  
  1244.           I[0] = IV                     I[0] = IV
  1245.   (n>0)   I[n] = R[n-1]                 I[n] = R[n-1]   
  1246.   (all n) R[n] = E(I[n])                R[n] = E(I[n])
  1247.   (all n) C[n] = P[n]^R[n]              P[n] = C[n]^R[n]
  1248.  
  1249.   OFB notes: encryption and decryption are identical. Since I[n] is
  1250.   independent of P and C, the E() function can be performed in advance of
  1251.   the receipt of the plain/cipher text with which it is to be used.
  1252.  
  1253.  
  1254.   Additional notes on DES ``modes of operation'':
  1255.  
  1256.   ECB and CBC use E() to encrypt and D() to decrypt, but the feedback
  1257.   modes use E() to both encrypt and decrypt. This disproves the following 
  1258.   erroneous claim: ``DES implementations which provide E() but not D()
  1259.   cannot be used for data confidentiality.''
  1260.  
  1261.  
  1262. ------------------------------------------------------------------------
  1263. Date: 05-21-94                         Msg # 12456  
  1264.   To: ALL                              Conf: (2120) news.answers
  1265. From: CRYPT-COMMENTS@MATH.NCSU.        Stat: Public
  1266. Subj: Cryptography FAQ (06/10:         Read: Yes
  1267. ------------------------------------------------------------------------
  1268.  @FROM   :CRYPT-COMMENTS@MATH.NCSU.EDU                                 
  1269.  @SUBJECT:Cryptography FAQ (06/10: Public Key Cryptography)            
  1270.  @PACKOUT:05-21-94                                                     
  1271. Message-ID: <cryptography-faq/part06_769514754@rtfm.mit.edu>
  1272. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers
  1273. talk.answers
  1274. Organization: The Crypt Cabal
  1275.  
  1276. Archive-name: cryptography-faq/part06
  1277. Last-modified: 93/08/23
  1278.  
  1279.  
  1280. This is the sixth of ten parts of the sci.crypt FAQ. The parts are
  1281. mostly independent, but you should read the first part before the rest.
  1282. We don't have the time to send out missing parts by mail, so don't ask.
  1283. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  1284.  
  1285. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  1286. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  1287. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  1288. sci.answers, and news.answers every 21 days.
  1289.  
  1290.  
  1291.  
  1292. Contents:
  1293.  
  1294. 6.1. What is public-key cryptography?
  1295. 6.2. How does public-key cryptography solve cryptography's Catch-22?
  1296. 6.3. What is the role of the `trapdoor function' in public key schemes?
  1297. 6.4. What is the role of the `session key' in public key schemes?
  1298. 6.5. What's RSA?
  1299. 6.6. Is RSA secure?
  1300. 6.7. What's the difference between the RSA and Diffie-Hellman schemes?
  1301. 6.8. What is `authentication' and the `key distribution problem'?
  1302. 6.9. How fast can people factor numbers?
  1303. 6.10. What about other public-key cryptosystems?
  1304. 6.11. What is the `RSA Factoring Challenge?'
  1305.  
  1306.  
  1307. 6.1. What is public-key cryptography?
  1308.  
  1309.   In a classic cryptosystem, we have encryption functions E_K and
  1310.   decryption functions D_K such that D_K(E_K(P)) = P for any plaintext
  1311.   P. In a public-key cryptosystem, E_K can be easily computed from some
  1312.   ``public key'' X which in turn is computed from K. X is published, so
  1313.   that anyone can encrypt messages. If decryption D_K cannot be easily 
  1314.   computed from public key X without knowledge of private key K, but 
  1315.   readily with knowledge of K, then only the person who generated K can
  1316.   decrypt messages. That's the essence of public-key cryptography, 
  1317.   introduced by Diffie and Hellman in 1976. 
  1318.   
  1319.   This document describes only the rudiments of public key cryptography.
  1320.   There is an extensive literature on security models for public-key 
  1321.   cryptography, applications of public-key cryptography, other 
  1322.   applications of the mathematical technology behind public-key 
  1323.   cryptography, and so on; consult the references at the end for more 
  1324.   refined and thorough presentations.
  1325.  
  1326. 6.2. How does public-key cryptography solve cryptography's Catch-22?
  1327.  
  1328.   In a classic cryptosystem, if you want your friends to be able to
  1329.   send secret messages to you, you have to make sure nobody other than
  1330.   them sees the key K. In a public-key cryptosystem, you just publish 
  1331.   X, and you don't have to worry about spies. Hence public key 
  1332.   cryptography `solves' one of the most vexing problems of all prior 
  1333.   cryptography: the necessity of establishing a secure channel for the 
  1334.   exchange of the key. To establish a secure channel one uses 
  1335.   cryptography, but private key cryptography requires a secure channel! 
  1336.   In resolving the dilemma, public key cryptography has been considered 
  1337.   by many to be a `revolutionary technology,' representing a 
  1338.   breakthrough that makes routine communication encryption practical 
  1339.   and potentially ubiquitous.
  1340.  
  1341. 6.3. What is the role of the `trapdoor function' in public key schemes?
  1342.   
  1343.   Intrinsic to public key cryptography is a `trapdoor function' D_K 
  1344.   with the properties that computation in one direction (encryption, 
  1345.   E_K) is easy and in the other is virtually impossible (attack,
  1346.   determining P from encryption E_K(P) and public key X). Furthermore, 
  1347.   it has the special property that the reversal of the computation 
  1348.   (decryption, D_K) is again tractable if the private key K is known.
  1349.  
  1350. 6.4. What is the role of the `session key' in public key schemes?
  1351.  
  1352.   In virtually all public key systems, the encryption and decryption 
  1353.   times are very lengthy compared to other block-oriented 
  1354.   algorithms such as DES for equivalent data sizes. Therefore in most
  1355.   implementations of public-key systems, a temporary, random `session 
  1356.   key' of much smaller length than the message is generated for each 
  1357.   message and alone encrypted by the public key algorithm. The message 
  1358.   is actually encrypted using a faster private key algorithm with the 
  1359.   session key. At the receiver side, the session key is decrypted using 
  1360.   the public-key algorithms and the recovered `plaintext' key is used 
  1361.   to decrypt the message.
  1362.   
  1363.   The session key approach blurs the distinction between `keys' and 
  1364.   `messages' -- in the scheme, the message includes the key, and the 
  1365.   key itself is treated as an encryptable `message'. Under this 
  1366.   dual-encryption approach, the overall cryptographic strength is 
  1367.   related to the security of either the public- and private-key 
  1368.   algorithms.
  1369.  
  1370. 6.5. What's RSA?
  1371.  
  1372.   RSA is a public-key cryptosystem defined by Rivest, Shamir, and
  1373.   Adleman. Here's a small example. See also [FTPDQ].
  1374.  
  1375.   Plaintexts are positive integers up to 2^{512}. Keys are quadruples
  1376.   (p,q,e,d), with p a 256-bit prime number, q a 258-bit prime number,
  1377.   and d and e large numbers with (de - 1) divisible by (p-1)(q-1). We
  1378.   define E_K(P) = P^e mod pq, D_K(C) = C^d mod pq. All quantities are
  1379.   readily computed from classic and modern number theoretic algorithms 
  1380.   (Euclid's algorithm for computing the greatest common divisor yields
  1381.   an algorithm for the former, and historically newly explored
  1382.   computational approaches to finding large `probable' primes, such as 
  1383.   the Fermat test, provide the latter.)
  1384.  
  1385.   Now E_K is easily computed from the pair (pq,e)---but, as far as
  1386.   anyone knows, there is no easy way to compute D_K from the pair
  1387.   (pq,e). So whoever generates K can publish (pq,e). Anyone can send a
  1388.   secret message to him; he is the only one who can read the messages.
  1389.  
  1390. 6.6. Is RSA secure?
  1391.  
  1392.   Nobody knows. An obvious attack on RSA is to factor pq into p and q.
  1393.   See below for comments on how fast state-of-the-art factorization
  1394.   algorithms run. Unfortunately nobody has the slightest idea how to
  1395.   prove that factorization---or any realistic problem at all, for that
  1396.   matter---is inherently slow. It is easy to formalize what we mean by
  1397.   ``RSA is/isn't strong''; but, as Hendrik W. Lenstra, Jr., says,
  1398.   ``Exact definitions appear to be necessary only when one wishes to
  1399.   prove that algorithms with certain properties do _not_ exist, and
  1400.   theoretical computer science is notoriously lacking in such negative
  1401.   results.''
  1402.  
  1403.   Note that there may even be a `shortcut' to breaking RSA other than
  1404.   factoring. It is obviously sufficient but so far not provably 
  1405.   necessary. That is, the security of the system depends on two 
  1406.   critical assumptions: (1) factoring is required to break the system,
  1407.   and (2) factoring is `inherently computationally intractable',
  1408.   or, alternatively, `factoring is hard' and `any approach that can 
  1409.   be used to break the system is at least as hard as factoring'.
  1410.  
  1411.   Historically even professional cryptographers have made mistakes
  1412.   in estimating and depending on the intractability of various 
  1413.   computational problems for secure cryptographic properties. For 
  1414.   example, a system called a `Knapsack cipher' was in vogue in the
  1415.   literature for years until it was demonstrated that the instances
  1416.   typically generated could be efficiently broken, and the whole
  1417.   area of research fell out of favor.
  1418.  
  1419. 6.7. What's the difference between the RSA and Diffie-Hellman schemes?
  1420.  
  1421.   Diffie and Hellman proposed a system that requires the dynamic 
  1422.   exchange of keys for every sender-receiver pair (and in practice, 
  1423.   usually every communications session, hence the term `session key').  
  1424.   This two-way key negotiation is useful in further complicating 
  1425.   attacks, but requires additional communications overhead. The RSA 
  1426.   system reduces communications overhead with the ability to have 
  1427.   static, unchanging keys for each receiver that are `advertised' by 
  1428.   a formal `trusted authority' (the hierarchical model) or distributed 
  1429.   in an informal `web of trust'.
  1430.  
  1431. 6.8. What is `authentication' and the `key-exchange problem'?
  1432.  
  1433.   The ``key exchange problem'' involves (1) ensuring that keys are
  1434.   exchanged so that the sender and receiver can perform encryption and
  1435.   decryption, and (2) doing so in such a way that ensures an
  1436.   eavesdropper or outside party cannot break the code. `Authentication'
  1437.   adds the requirement that (3) there is some assurance to the receiver
  1438.   that a message was encrypted by `a given entity' and not `someone 
  1439.   else'.
  1440.  
  1441.   The simplest but least available method to ensure all constraints 
  1442.   above are satisfied (successful key exchange and valid authentication)
  1443.   is employed by private key cryptography: exchanging the key secretly.
  1444.   Note that under this scheme, the problem of authentication is 
  1445.   implicitly resolved. The assumption under the scheme is that only the
  1446.   sender will have the key capable of encrypting sensible messages
  1447.   delivered to the receiver. 
  1448.  
  1449.   While public-key cryptographic methods solve a critical aspect of the 
  1450.   `key-exchange problem', specifically their resistance to analysis
  1451.   even with the presence a passive eavesdropper during exchange of keys, 
  1452.   they do not solve all problems associated with key exchange. In
  1453.   particular, since the keys are considered `public knowledge,'
  1454.   (particularly with RSA) some other mechanism must be
  1455.   developed to testify to authenticity, because possession of keys 
  1456.   alone (sufficient to encrypt intelligible messages) is no evidence
  1457.   of a particular unique identity of the sender.
  1458.  
  1459.   One solution is to develop a key distribution mechanism that assures
  1460.   that listed keys are actually those of the given entities, sometimes
  1461.   called a `trusted authority'. The authority typically does not actually
  1462.   generate keys, but does ensure via some mechanism that the lists of 
  1463.   keys and associated identities kept and advertised for reference
  1464.   by senders and receivers are `correct'. Another method relies on users
  1465.   to distribute and track each other's keys and trust in an informal,
  1466.   distributed fashion. This has been popularized as a viable alternative
  1467.   by the PGP software which calls the model the `web of trust'.
  1468.  
  1469.   Under RSA, if a person wishes to send evidence of their identity in
  1470.   addition to an encrypted message, they simply encrypt some information
  1471.   with their private key called the `signature', additionally included in
  1472.   the message sent under the public-key encryption to the receiver. 
  1473.   The receiver can use the RSA algorithm `in reverse' to verify that the
  1474.   information decrypts sensibly, such that only the given entity could
  1475.   have encrypted the plaintext by use of the secret key. Typically the
  1476.   encrypted `signature' is a `message digest' that comprises a unique
  1477.   mathematical `summary' of the secret message (if the signature were
  1478.   static across multiple messages, once known previous receivers could 
  1479.   use it falsely). In this way, theoretically only the sender of the
  1480.   message could generate their valid signature for that message, thereby
  1481.   authenticating it for the receiver. `Digital signatures' have many 
  1482.   other design properties as described in Section 7.
  1483.  
  1484.  
  1485. 6.9. How fast can people factor numbers?
  1486.  
  1487.   It depends on the size of the numbers, and their form. Numbers
  1488.   in special forms, such as a^n - b for `small' b, are more readily
  1489.   factored through specialized techniques and not necessarily related
  1490.   to the difficulty of factoring in general. Hence a specific factoring 
  1491.   `breakthrough' for a special number form may have no practical value 
  1492.   or relevance to particular instances (and those generated for use
  1493.   in cryptographic systems are specifically `filtered' to resist such
  1494.   approaches.) The most important observation about factoring is that
  1495.   all known algorithms require an exponential amount of time in the
  1496.   _size_ of the number (measured in bits, log2(n) where `n' is the 
  1497.   number). Cryptgraphic algorithms built on the difficulty of factoring
  1498.   generally depend on this exponential-time property. (The distinction
  1499.   of `exponential' vs. `polynomial time' algorithms, or NP vs. P, is a 
  1500.   major area of active computational research, with insights very 
  1501.   closely intertwined with cryptographic security.)
  1502.   
  1503.   In October 1992 Arjen Lenstra and Dan Bernstein factored 2^523 - 1 
  1504.   into primes, using about three weeks of MasPar time. (The MasPar is 
  1505.   a 16384-processor SIMD machine; each processor can add about 200000 
  1506.   integers per second.) The algorithm there is called the ``number field 
  1507.   sieve''; it is quite a bit faster for special numbers like 2^523 - 1 
  1508.   than for general numbers n, but it takes time only 
  1509.   exp(O(log^{1/3} n log^{2/3} log n)) in any case.
  1510.  
  1511.   An older and more popular method for smaller numbers is the ``multiple
  1512.   polynomial quadratic sieve'', which takes time exp(O(log^{1/2} n
  1513.   log^{1/2} log n))---faster than the number field sieve for small n,
  1514.   but slower for large n. The breakeven point is somewhere between 100
  1515.   and 150 digits, depending on the implementations.
  1516.  
  1517.   Factorization is a fast-moving field---the state of the art just a few
  1518.   years ago was nowhere near as good as it is now. If no new methods are
  1519.   developed, then 2048-bit RSA keys will always be safe from
  1520.   factorization, but one can't predict the future. (Before the number
  1521.   field sieve was found, many people conjectured that the quadratic
  1522.   sieve was asymptotically as fast as any factoring method could be.)
  1523.  
  1524. 6.10. What about other public-key cryptosystems?
  1525.  
  1526.   We've talked about RSA because it's well known and easy to describe.
  1527.   But there are lots of other public-key systems around, many of which
  1528.   are faster than RSA or depend on problems more widely believed to be
  1529.   difficult. This has been just a brief introduction; if you really want
  1530.   to learn about the many facets of public-key cryptography, consult the
  1531.   books and journal articles listed in part 10.
  1532.  
  1533. 6.11. What is the ``RSA Factoring Challenge''?
  1534.  
  1535.   In ~1992 the RSA Data Securities Inc., owner and licensor of multiple
  1536.   patents on the RSA hardware and public key cryptographic techniques in
  1537.   general, and maker of various software encryption packages and 
  1538.   libraries, announced on sci.math and elsewhere the creation of an 
  1539.   ongoing Factoring Challenge contest to gauge the state of the art in
  1540.   factoring technology. Every month a series of numbers are posted and
  1541.   monetary awards are given to the first respondent to break them into
  1542.   factors. Very significant hardware resources are required to succeed 
  1543.   by beating other participants. Information can be obtained via 
  1544.   automated reply from
  1545.  
  1546.     challenge-rsa-honor-roll@rsa.com
  1547.     challenge-partition-honor-roll@rsa.com
  1548.  
  1549.  
  1550.  
  1551. ------------------------------------------------------------------------
  1552. Date: 05-21-94                         Msg # 12457  
  1553.   To: ALL                              Conf: (2120) news.answers
  1554. From: CRYPT-COMMENTS@MATH.NCSU.        Stat: Public
  1555. Subj: Cryptography FAQ (07/10:         Read: Yes
  1556. ------------------------------------------------------------------------
  1557.  @FROM   :CRYPT-COMMENTS@MATH.NCSU.EDU                                 
  1558.  @SUBJECT:Cryptography FAQ (07/10: Digital Signatures)                 
  1559.  @PACKOUT:05-21-94                                                     
  1560. Message-ID: <cryptography-faq/part07_769514754@rtfm.mit.edu>
  1561. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers
  1562. talk.answers
  1563. Organization: The Crypt Cabal
  1564.  
  1565. Archive-name: cryptography-faq/part07
  1566. Last-modified: 93/05/04
  1567.  
  1568. This is the seventh of ten parts of the sci.crypt FAQ. The parts are
  1569. mostly independent, but you should read the first part before the rest.
  1570. We don't have the time to send out missing parts by mail, so don't ask.
  1571. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  1572.  
  1573. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  1574. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  1575. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  1576. sci.answers, and news.answers every 21 days.
  1577.  
  1578.  
  1579.  
  1580. Contents:
  1581.  
  1582. 7.1. What is a one-way hash function?
  1583. 7.2. What is the difference between public, private, secret, shared, etc.?
  1584. 7.3. What are MD4 and MD5?
  1585. 7.4. What is Snefru?
  1586.  
  1587.  
  1588. 7.1. What is a one-way hash function?
  1589.  
  1590.   A typical one-way hash function takes a variable-length message and
  1591.   produces a fixed-length hash. Given the hash it is computationally
  1592.   impossible to find a message with that hash; in fact one can't
  1593.   determine any usable information about a message with that hash, not
  1594.   even a single bit. For some one-way hash functions it's also
  1595.   computationally impossible to determine two messages which produce the
  1596.   same hash.
  1597.  
  1598.   A one-way hash function can be private or public, just like an
  1599.   encryption function. Here's one application of a public one-way hash
  1600.   function, like MD5 or Snefru. Most public-key signature systems are
  1601.   relatively slow. To sign a long message may take longer than the user
  1602.   is willing to wait. Solution: Compute the one-way hash of the message,
  1603.   and sign the hash, which is short. Now anyone who wants to verify the
  1604.   signature can do the same thing.
  1605.  
  1606.   Another name for one-way hash function is message digest function.
  1607.  
  1608. 7.2. What is the difference between public, private, secret, shared, etc.?
  1609.  
  1610.   There is a horrendous mishmash of terminology in the literature for a
  1611.   very small set of concepts. Here are the concepts: (1) When an
  1612.   algorithm depends on a key which isn't published, we call it a private
  1613.   algorithm; otherwise we call it a public algorithm. (2) We have
  1614.   encryption functions E and decryption functions D, so that D(E(M)) = M
  1615.   for any message M. (3) We also have hashing functions H and
  1616.   verification functions V, such that V(M,X) = 1 if and only if X = H(M).
  1617.  
  1618.   A public-key cryptosystem has public encryption and private
  1619.   decryption. Checksums, such as the application mentioned in the
  1620.   previous question, have public hashing and public verification.
  1621.   Digital signature functions have private hashing and public
  1622.   verification: only one person can produce the hash for a message,
  1623.   but everyone can verify that the hash is correct.
  1624.  
  1625.   Obviously, when an algorithm depends on a private key, it's meant to
  1626.   be unusable by anyone who doesn't have the key. There's no real
  1627.   difference between a ``shared'' key and a private key: a shared key
  1628.   isn't published, so it's private. If you encrypt data for a friend
  1629.   rather than ``for your eyes only'', are you suddenly doing
  1630.   ``shared-key encryption'' rather than private-key encryption? No.
  1631.  
  1632. 7.3. What are MD4 and MD5?
  1633.  
  1634.   MD4 and MD5 are message digest functions developed by Ron Rivest.
  1635.   Definitions appear in RFC 1320 and RFC 1321 (see part 10). Code is
  1636.   available from [FTPMD].
  1637.  
  1638.   Note that a transcription error was found in the original MD5 draft
  1639.   RFC. The corrected algorithm should be called MD5a, though some
  1640.   people refer to it as MD5.
  1641.  
  1642. 7.4. What is Snefru?
  1643.  
  1644.   Snefru is a family of message digest functions developed by Ralph
  1645.   Merkle. Snefru-8 is an 8-round function, the newest in the family.
  1646.   Definitions appear in Merkle's paper [ME91a]. Code is available from
  1647.   [FTPSF].
  1648.  
  1649.  
  1650. ------------------------------------------------------------------------
  1651. Date: 05-21-94                         Msg # 12458  
  1652.   To: ALL                              Conf: (2120) news.answers
  1653. From: CRYPT-COMMENTS@MATH.NCSU.        Stat: Public
  1654. Subj: Cryptography FAQ (08/10:         Read: Yes
  1655. ------------------------------------------------------------------------
  1656.  @FROM   :CRYPT-COMMENTS@MATH.NCSU.EDU                                 
  1657.  @SUBJECT:Cryptography FAQ (08/10: Technical Miscellany)               
  1658.  @PACKOUT:05-21-94                                                     
  1659. Message-ID: <cryptography-faq/part08_769514754@rtfm.mit.edu>
  1660. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers
  1661. talk.answers
  1662. Organization: The Crypt Cabal
  1663.  
  1664. Archive-name: cryptography-faq/part08
  1665. Last-modified: 93/08/14
  1666.  
  1667.  
  1668. This is the eighth of ten parts of the sci.crypt FAQ. The parts are
  1669. mostly independent, but you should read the first part before the rest.
  1670. We don't have the time to send out missing parts by mail, so don't ask.
  1671. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  1672.  
  1673. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  1674. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  1675. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  1676. sci.answers, and news.answers every 21 days.
  1677.  
  1678.  
  1679.  
  1680. Contents
  1681.  
  1682. 8.1. How do I recover from lost passwords in WordPerfect?
  1683. 8.2. How do I break a Vigenere (repeated-key) cipher?
  1684. 8.3. How do I send encrypted mail under UNIX? [PGP, RIPEM, PEM, ...]
  1685. 8.4. Is the UNIX crypt command secure?
  1686. 8.5. How do I use compression with encryption?
  1687. 8.6. Is there an unbreakable cipher?
  1688. 8.7. What does ``random'' mean in cryptography?
  1689. 8.8. What is the unicity point (a.k.a. unicity distance)?
  1690. 8.9. What is key management and why is it important?
  1691. 8.10. Can I use pseudo-random or chaotic numbers as a key stream?
  1692. 8.11. What is the correct frequency list for English letters?
  1693. 8.12. What is the Enigma?
  1694. 8.13. How do I shuffle cards?
  1695. 8.14. Can I foil S/W pirates by encrypting my CD-ROM?
  1696. 8.15. Can you do automatic cryptanalysis of simple ciphers?
  1697. 8.16. What is the coding system used by VCR+?
  1698.  
  1699.  
  1700. 8.1. How do I recover from lost passwords in WordPerfect?
  1701.  
  1702.   WordPerfect encryption has been shown to be very easy to break.
  1703.   The method uses XOR with two repeating key streams: a typed password
  1704.   and a byte-wide counter initialized to 1+<the password length>. Full
  1705.   descriptions are given in Bennett [BEN87] and Bergen and Caelli
  1706.   [BER91].
  1707.  
  1708.   Chris Galas writes: ``Someone awhile back was looking for a way to
  1709.   decrypt WordPerfect document files and I think I have a solution. 
  1710.   There is a software company named: Accessdata (87 East 600 South,
  1711.   Orem, UT 84058), 1-800-658-5199 that has a software package that will
  1712.   decrypt any WordPerfect, Lotus 1-2-3, Quatro-Pro, MS Excel and Paradox
  1713.   files. The cost of the package is $185. Steep prices, but if you
  1714.   think your pw key is less than 10 characters, (or 10 char) give them a
  1715.   call and ask for the free demo disk. The demo disk will decrypt files
  1716.   that have a 10 char or less pw key.'' Bruce Schneier says the phone
  1717.   number for AccessData is 801-224-6970.
  1718.  
  1719. 8.2. How do I break a Vigenere (repeated-key) cipher?
  1720.  
  1721.   A repeated-key cipher, where the ciphertext is something like the
  1722.   plaintext xor KEYKEYKEYKEY (and so on), is called a Vigenere cipher.
  1723.   If the key is not too long and the plaintext is in English, do the
  1724.   following: 
  1725.  
  1726.   1. Discover the length of the key by counting coincidences.
  1727.   (See Gaines [GAI44], Sinkov [SIN66].) Trying each displacement of
  1728.   the ciphertext against itself, count those bytes which are equal. 
  1729.   If the two ciphertext portions have used the same key, something
  1730.   over 6% of the bytes will be equal. If they have used different
  1731.   keys, then less than 0.4% will be equal (assuming random 8-bit bytes
  1732.   of key covering normal ASCII text). The smallest displacement which
  1733.   indicates an equal key is the length of the repeated key.
  1734.  
  1735.   2. Shift the text by that length and XOR it with itself. This
  1736.   removes the key and leaves you with text XORed with itself. Since
  1737.   English has about 1 bit of real information per byte, 2 streams of
  1738.   text XORed together has 2 bits of info per 8-bit byte, providing
  1739.   plenty of redundancy for choosing a unique decryption. (And in fact
  1740.   one stream of text XORed with itself has just 1 bit per byte.)
  1741.  
  1742.   If the key is short, it might be even easier to treat this as a
  1743.   standard polyalphabetic substitution. All the old cryptanalysis
  1744.   texts show how to break those. It's possible with those methods, in
  1745.   the hands of an expert, if there's only ten times as much text as key.
  1746.   See, for example, Gaines [GAI44], Sinkov [SIN66].
  1747.  
  1748. 8.3. How do I send encrypted mail under UNIX? [PGP, RIPEM, PEM, ...]
  1749.  
  1750.   Here's one popular method, using the des command:
  1751.  
  1752.     cat file | compress | des private_key | uuencode | mail
  1753.  
  1754.   Meanwhile, there is a de jure Internet standard in the works called
  1755.   PEM (Privacy Enhanced Mail). It is described in RFCs 1421 through
  1756.   1424. To join the PEM mailing list, contact pem-dev-request@tis.com.
  1757.   There is a beta version of PEM being tested at the time of this
  1758.   writing.
  1759.  
  1760.   There are also two programs available in the public domain for encrypting
  1761.   mail: PGP and RIPEM. Both are available by FTP. Each has its own
  1762.   newsgroup: alt.security.pgp and alt.security.ripem. Each has its own FAQ
  1763.   as well.
  1764.  
  1765.   PGP is most commonly used outside the USA since it uses the RSA algorithm
  1766.   without a license and RSA's patent is valid only (or at least primarily)
  1767.   in the USA.
  1768.  
  1769.   RIPEM is most commonly used inside the USA since it uses the RSAREF which
  1770.   is freely available within the USA but not available for shipment outside
  1771.   the USA.
  1772.  
  1773.   Since both programs use a secret key algorithm for encrypting the body of
  1774.   the message (PGP used IDEA; RIPEM uses DES) and RSA for encrypting the
  1775.   message key, they should be able to interoperate freely. Although there
  1776.   have been repeated calls for each to understand the other's formats and
  1777.   algorithm choices, no interoperation is available at this time (as far as
  1778.   we know).
  1779.  
  1780. 8.4. Is the UNIX crypt command secure?
  1781.  
  1782.   No. See [REE84]. There is a program available called cbw (crypt
  1783.   breaker's workbench) which can be used to do ciphertext-only attacks
  1784.   on files encrypted with crypt. One source for CBW is [FTPCB].
  1785.  
  1786. 8.5. How do I use compression with encryption?
  1787.  
  1788.   A number of people have proposed doing perfect compression followed by
  1789.   some simple encryption method (e.g., XOR with a repeated key).  This
  1790.   would work, if you could do perfect compression.  Unfortunately, you can
  1791.   only compress perfectly if you know the exact distribution of possible
  1792.   inputs, and that is almost certainly not possible.
  1793.  
  1794.   Compression aids encryption by reducing the redundancy of the plaintext.
  1795.   This increases the amount of ciphertext you can send encrypted under a
  1796.   given number of key bits.  (See "unicity distance")
  1797.  
  1798.   Nearly all practical compression schemes, unless they have been designed
  1799.   with cryptography in mind, produce output that actually starts off with
  1800.   high redundancy. For example, the output of UNIX compress begins with a
  1801.   well-known three-byte ``magic number''.  This produces a field of "known
  1802.   plaintext" which can be used for some forms of cryptanalytic attack.
  1803.   Compression is generally of value, however, because it removes other
  1804.   known plaintext in the middle of the file being encrypted.  In general,
  1805.   the lower the redundancy of the plaintext being fed an encryption
  1806.   algorithm, the more difficult the cryptanalysis of that algorithm.
  1807.  
  1808.   In addition, compression shortens the input file, shortening the output
  1809.   file and reducing the amount of CPU required to do the encryption
  1810.   algorithm, so even if there were no enhancement of security, compression
  1811.   before encryption would be worthwhile.
  1812.  
  1813.   Compression after encryption is silly.  If an encryption algorithm is
  1814.   good, it will produce output which is statistically indistinguishable
  1815.   from random numbers and no compression algorithm will successfully
  1816.   compress random numbers.  On the other hand, if a compression algorithm
  1817.   succeeds in finding a pattern to compress out of an encryption's output,
  1818.   then a flaw in that algorithm has been found.
  1819.  
  1820. 8.6. Is there an unbreakable cipher?
  1821.  
  1822.   Yes. The one-time pad is unbreakable; see part 4. Unfortunately the
  1823.   one-time pad requires secure distribution of as much key material as
  1824.   plaintext.
  1825.  
  1826.   Of course, a cryptosystem need not be utterly unbreakable to be
  1827.   useful. Rather, it needs to be strong enough to resist attacks by
  1828.   likely enemies for whatever length of time the data it protects is
  1829.   expected to remain valid.
  1830.  
  1831. 8.7. What does ``random'' mean in cryptography?
  1832.  
  1833.   Cryptographic applications demand much more out of a pseudorandom
  1834.   number generator than most applications. For a source of bits to be
  1835.   cryptographically random, it must be computationally impossible to
  1836.   predict what the Nth random bit will be given complete knowledge of
  1837.   the algorithm or hardware generating the stream and the sequence of
  1838.   0th through N-1st bits, for all N up to the lifetime of the source.
  1839.  
  1840.   A software generator (also known as pseudo-random) has the function
  1841.   of expanding a truly random seed to a longer string of apparently
  1842.   random bits. This seed must be large enough not to be guessed by
  1843.   the opponent. Ideally, it should also be truly random (perhaps
  1844.   generated by a hardware random number source).
  1845.  
  1846.   Those who have Sparcstation 1 workstations could, for example,
  1847.   generate random numbers using the audio input device as a source of
  1848.   entropy, by not connecting anything to it. For example,
  1849.  
  1850.         cat /dev/audio | compress - >foo
  1851.  
  1852.   gives a file of high entropy (not random but with much randomness in
  1853.   it). One can then encrypt that file using part of itself as a key,
  1854.   for example, to convert that seed entropy into a pseudo-random
  1855.   string.
  1856.  
  1857.   When looking for hardware devices to provide this entropy, it is
  1858.   important really to measure the entropy rather than just assume that
  1859.   because it looks complicated to a human, it must be "random". For
  1860.   example, disk operation completion times sound like they might be
  1861.   unpredictable (to many people) but a spinning disk is much like a
  1862.   clock and its output completion times are relatively low in entropy.
  1863.  
  1864. 8.8. What is the unicity point (a.k.a. unicity distance)?
  1865.  
  1866.   See [SHA49]. The unicity distance is an approximation to that amount
  1867.   of ciphertext such that the sum of the real information (entropy) in
  1868.   the corresponding source text and encryption key equals the number
  1869.   of ciphertext bits used. Ciphertexts significantly longer than this
  1870.   can be shown probably to have a unique decipherment. This is used to
  1871.   back up a claim of the validity of a ciphertext-only cryptanalysis. 
  1872.   Ciphertexts significantly shorter than this are likely to have
  1873.   multiple, equally valid decryptions and therefore to gain security
  1874.   from the opponent's difficulty choosing the correct one.
  1875.  
  1876.   Unicity distance, like all statistical or information-theoretic
  1877.   measures, does not make deterministic predictions but rather gives
  1878.   probabilistic results: namely, the minimum amount of ciphertext
  1879.   for which it is likely that there is only a single intelligible
  1880.   plaintext corresponding to the ciphertext, when all possible keys
  1881.   are tried for the decryption. Working cryptologists don't normally
  1882.   deal with unicity distance as such. Instead they directly determine
  1883.   the likelihood of events of interest.
  1884.  
  1885.   Let the unicity distance of a cipher be D characters. If fewer than
  1886.   D ciphertext characters have been intercepted, then there is not
  1887.   enough information to distinguish the real key from a set of
  1888.   possible keys. DES has a unicity distance of 17.5 characters,
  1889.   which is less than 3 ciphertext blocks (each block corresponds to
  1890.   8 ASCII characters). This may seem alarmingly low at first, but
  1891.   the unicity distance gives no indication of the computational work
  1892.   required to find the key after approximately D characters have been
  1893.   intercepted.
  1894.  
  1895.   In fact, actual cryptanalysis seldom proceeds along the lines used
  1896.   in discussing unicity distance. (Like other measures such as key
  1897.   size, unicity distance is something that guarantees insecurity if
  1898.   it's too small, but doesn't guarantee security if it's high.) Few
  1899.   practical cryptosystems are absolutely impervious to analysis; all
  1900.   manner of characteristics might serve as entering ``wedges'' to crack
  1901.   some cipher messages. However, similar information-theoretic
  1902.   considerations are occasionally useful, for example, to determine a
  1903.   recommended key change interval for a particular cryptosystem.
  1904.   Cryptanalysts also employ a variety of statistical and
  1905.   information-theoretic tests to help guide the analysis in the most
  1906.   promising directions.
  1907.  
  1908.   Unfortunately, most literature on the application of information
  1909.   statistics to cryptanalysis remains classified, even the seminal
  1910.   1940 work of Alan Turing (see [KOZ84]). For some insight into the
  1911.   possibilities, see [KUL68] and [GOO83].
  1912.  
  1913. 8.9. What is key management and why is it important?
  1914.  
  1915.   One of the fundamental axioms of cryptography is that the enemy is in
  1916.   full possession of the details of the general cryptographic system,
  1917.   and lacks only the specific key data employed in the encryption. (Of
  1918.   course, one would assume that the CIA does not make a habit of telling
  1919.   Mossad about its cryptosystems, but Mossad probably finds out anyway.)
  1920.   Repeated use of a finite amount of key provides redundancy that can
  1921.   eventually facilitate cryptanalytic progress. Thus, especially in
  1922.   modern communication systems where vast amounts of information are
  1923.   transferred, both parties must have not only a sound cryptosystem but
  1924.   also enough key material to cover the traffic.
  1925.  
  1926.   Key management refers to the distribution, authentication, and
  1927.   handling of keys.
  1928.  
  1929.   A publicly accessible example of modern key management technology
  1930.   is the STU III secure telephone unit, which for classified use
  1931.   employs individual coded ``Crypto Ignition Keys'' and a central Key
  1932.   Management Center operated by NSA. There is a hierarchy in that
  1933.   certain CIKs are used by authorized cryptographic control
  1934.   personnel to validate the issuance of individual traffic keys and
  1935.   to perform installation/maintenance functions, such as the
  1936.   reporting of lost CIKs.
  1937.  
  1938.   This should give an inkling of the extent of the key management
  1939.   problem. For public-key systems, there are several related issues,
  1940.   many having to do with ``whom do you trust?''
  1941.  
  1942. 8.10. Can I use pseudo-random or chaotic numbers as a key stream?
  1943.  
  1944.   Chaotic equations and fractals produce an apparent randomness from
  1945.   relatively compact generators. Perhaps the simplest example is a
  1946.   linear congruential sequence, one of the most popular types of random
  1947.   number generators, where there is no obvious dependence between seeds
  1948.   and outputs. Unfortunately the graph of any such sequence will, in a
  1949.   high enough dimension, show up as a regular lattice. Mathematically
  1950.   this lattice corresponds to structure which is notoriously easy for
  1951.   cryptanalysts to exploit. More complicated generators have more
  1952.   complicated structure, which is why they make interesting pictures---
  1953.   but a cryptographically strong sequence will have no computable
  1954.   structure at all.
  1955.  
  1956.   See [KNU81], exercise 3.5-7; [REE77]; and [BOY89].
  1957.  
  1958. 8.11. What is the correct frequency list for English letters?
  1959.  
  1960.   There are three answers to this question, each slightly deeper than
  1961.   the one before. You can find the first answer in various books:
  1962.   namely, a frequency list computed directly from a certain sample of
  1963.   English text.
  1964.  
  1965.   The second answer is that ``the English language'' varies from author
  1966.   to author and has changed over time, so there is no definitive list.
  1967.   Of course the lists in the books are ``correctly'' computed, but
  1968.   they're all different: exactly which list you get depends on which
  1969.   sample was taken. Any particular message will have different
  1970.   statistics from those of the language as a whole.
  1971.  
  1972.   The third answer is that yes, no particular message is going to have
  1973.   exactly the same characteristics as English in general, but for all
  1974.   reasonable statistical uses these slight discrepancies won't matter.
  1975.   In fact there's an entire field called ``Bayesian statistics'' (other
  1976.   buzzwords are ``maximum entropy methods'' and ``maximum likelihood
  1977.   estimation'') which studies questions like ``What's the chance that a
  1978.   text with these letter frequencies is in English?'' and comes up with
  1979.   reasonably robust answers.
  1980.  
  1981.   So make your own list from your own samples of English text. It will
  1982.   be good enough for practical work, if you use it properly.
  1983.  
  1984. 8.12. What is the Enigma?
  1985.  
  1986.   ``For a project in data security we are looking for sources of
  1987.   information about the German Enigma code and how it was broken by
  1988.   the British during WWII.''
  1989.  
  1990.   See [WEL82], [DEA85], [KOZ84], [HOD83], [KAH91].
  1991.  
  1992. 8.13. How do I shuffle cards?
  1993.  
  1994.   Card shuffling is a special case of the permutation of an array of
  1995.   values, using a random or pseudo-random function. All possible output
  1996.   permutations of this process should be equally likely. To do this, you
  1997.   need a random function (modran(x)) which will produce a uniformly
  1998.   distributed random integer in the interval [0..x-1]. Given that
  1999.   function, you can shuffle with the following [C] code: (assuming ARRLTH
  2000.   is the length of array arr[] and swap() interchanges values at the two
  2001.   addresses given)
  2002.  
  2003.   for ( n = ARRLTH-1; n > 0 ; n-- ) swap( &arr[modran( n+1 )], &arr[n] ) ;
  2004.  
  2005.   modran(x) can not be achieved exactly with a simple (ranno() % x) since
  2006.   ranno()'s interval may not be divisible by x, although in most cases the
  2007.   error will be very small. To cover this case, one can take ranno()'s
  2008.   modulus mod x, call that number y, and if ranno() returns a value less
  2009.   than y, go back and get another ranno() value.
  2010.  
  2011.   See [KNU81] for further discussion.
  2012.  
  2013. 8.14. Can I foil S/W pirates by encrypting my CD-ROM?
  2014.  
  2015.   Someone will frequently express the desire to publish a CD-ROM with
  2016.   possibly multiple pieces of software, perhaps with each encrypted
  2017.   separately, and will want to use different keys for each user (perhaps
  2018.   even good for only a limited period of time) in order to avoid piracy.
  2019.  
  2020.   As far as we know, this is impossible, since there is nothing in standard
  2021.   PC or workstation hardware which uniquely identifies the user at the
  2022.   keyboard. If there were such an identification, then the CD-ROM could be
  2023.   encrypted with a key based in part on the one sold to the user and in
  2024.   part on the unique identifier. However, in this case the CD-ROM is one
  2025.   of a kind and that defeats the intended purpose.
  2026.  
  2027.   If the CD-ROM is to be encrypted once and then mass produced, there must
  2028.   be a key (or set of keys) for that encryption produced at some stage in
  2029.   the process. That key is useable with any copy of the CD-ROM's data.
  2030.   The pirate needs only to isolate that key and sell it along with the
  2031.   illegal copy.
  2032.  
  2033. 8.15. Can you do automatic cryptanalysis of simple ciphers?
  2034.  
  2035.   Certainly. For commercial products you can try AccessData; see
  2036.   question 8.1. We are not aware of any FTP sites for such software,
  2037.   but there are many papers on the subject. See [PEL79], [LUC88],
  2038.   [CAR86], [CAR87], [KOC87], [KOC88], [KIN92], [KIN93], [SPI93].
  2039.  
  2040. 8.16. What is the coding system used by VCR+?
  2041.  
  2042.   One very frequently asked question in sci.crypt is how the VCR+ codes
  2043.   work. The codes are used to program a VCR based on numerical input.
  2044.   See [SHI92] for an attempt to describe it.
  2045.  
  2046.  
  2047. ------------------------------------------------------------------------
  2048. Date: 05-21-94                         Msg # 12459  
  2049.   To: ALL                              Conf: (2120) news.answers
  2050. From: CRYPT-COMMENTS@MATH.NCSU.        Stat: Public
  2051. Subj: Cryptography FAQ (09/10:         Read: Yes
  2052. ------------------------------------------------------------------------
  2053.  @FROM   :CRYPT-COMMENTS@MATH.NCSU.EDU                                 
  2054.  @SUBJECT:Cryptography FAQ (09/10: Other Miscellany)                   
  2055.  @PACKOUT:05-21-94                                                     
  2056. Message-ID: <cryptography-faq/part09_769514754@rtfm.mit.edu>
  2057. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers
  2058. talk.answers
  2059. Organization: The Crypt Cabal
  2060.  
  2061. Archive-name: cryptography-faq/part09
  2062. Last-modified: 93/08/14
  2063.  
  2064.  
  2065. This is the ninth of ten parts of the sci.crypt FAQ. The parts are
  2066. mostly independent, but you should read the first part before the rest.
  2067. We don't have the time to send out missing parts by mail, so don't ask.
  2068. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  2069.  
  2070. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  2071. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  2072. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  2073. sci.answers, and news.answers every 21 days.
  2074.  
  2075.  
  2076. Contents:
  2077.  
  2078. 9.1. What is the National Security Agency (NSA)?
  2079. 9.2. What are the US export regulations?
  2080. 9.3. What is TEMPEST?
  2081. 9.4. What are the Beale Ciphers, and are they a hoax?
  2082. 9.5. What is the American Cryptogram Association, and how do I get in touch?
  2083. 9.6. Is RSA patented?
  2084. 9.7. What about the Voynich manuscript?
  2085.  
  2086.  
  2087. 9.1. What is the National Security Agency (NSA)?
  2088.  
  2089.   The NSA is the official communications security body of the U.S.
  2090.   government. It was given its charter by President Truman in the early
  2091.   50's, and has continued research in cryptology till the present. The 
  2092.   NSA is known to be the largest employer of mathematicians in the world,
  2093.   and is also the largest purchaser of computer hardware in the
  2094.   world. Governments in general have always been prime employers of
  2095.   cryptologists. The NSA probably possesses cryptographic expertise many
  2096.   years ahead of the public state of the art, and can undoubtedly break
  2097.   many of the systems used in practice; but for reasons of national
  2098.   security almost all information about the NSA is classified.
  2099.  
  2100.   Bamford's book [BAMFD] gives a history of the people and operations of
  2101.   the NSA. The following quote from Massey [MAS88] highlights the
  2102.   difference between public and private research in cryptography:
  2103.  
  2104.   ``... if one regards cryptology as the prerogative of government,
  2105.   one accepts that most cryptologic research will be conducted
  2106.   behind closed doors. Without doubt, the number of workers engaged
  2107.   today in such secret research in cryptology far exceeds that of
  2108.   those engaged in open research in cryptology. For only about 10
  2109.   years has there in fact been widespread open research in
  2110.   cryptology. There have been, and will continue to be, conflicts
  2111.   between these two research communities. Open research is common
  2112.   quest for knowledge that depends for its vitality on the open
  2113.   exchange of ideas via conference presentations and publications in
  2114.   scholarly journals. But can a government agency, charged with
  2115.   responsibilities of breaking the ciphers of other nations,
  2116.   countenance the publication of a cipher that it cannot break? Can
  2117.   a researcher in good conscience publish such a cipher that might
  2118.   undermine the effectiveness of his own government's code-breakers?
  2119.   One might argue that publication of a provably-secure cipher would
  2120.   force all governments to behave like Stimson's `gentlemen', but one
  2121.   must be aware that open research in cryptography is fraught with
  2122.   political and ethical considerations of a severity than in most
  2123.   scientific fields. The wonder is not that some conflicts have
  2124.   occurred between government agencies and open researchers in
  2125.   cryptology, but rather that these conflicts (at least those of which
  2126.   we are aware) have been so few and so mild.''
  2127.  
  2128. 9.2. What are the US export regulations?
  2129.  
  2130.   In a nutshell, there are two government agencies which control
  2131.   export of encryption software. One is the Bureau of Export
  2132.   Administration (BXA) in the Department of Commerce, authorized by
  2133.   the Export Administration Regulations (EAR). Another is the Office
  2134.   of Defense Trade Controls (DTC) in the State Department, authorized
  2135.   by the International Traffic in Arms Regulations (ITAR). As a rule
  2136.   of thumb, BXA (which works with COCOM) has less stringent
  2137.   requirements, but DTC (which takes orders from NSA) wants to see
  2138.   everything first and can refuse to transfer jurisdiction to BXA.
  2139.  
  2140.   The newsgroup misc.legal.computing carries many interesting
  2141.   discussions on the laws surrounding cryptographic export, what
  2142.   people think about those laws, and many other complex issues which
  2143.   go beyond the scope of technical groups like sci.crypt. Make sure to
  2144.   consult your lawyer before doing anything which will get you thrown in
  2145.   jail; if you are lucky, your lawyer might know a lawyer who has at
  2146.   least heard of the ITAR.
  2147.  
  2148. 9.3. What is TEMPEST?
  2149.  
  2150.   TEMPEST is a standard for electromagnetic shielding for computer
  2151.   equipment. It was created in response to the discovery that
  2152.   information can be read from computer radiation (e.g., from a CRT) at
  2153.   quite a distance and with little effort.
  2154.  
  2155.   Needless to say, encryption doesn't do much good if the cleartext
  2156.   is available this way.
  2157.  
  2158. 9.4. What are the Beale Ciphers, and are they a hoax?
  2159.  
  2160.   (Thanks to Jim Gillogly for this information and John King for
  2161.   corrections.)
  2162.  
  2163.   The story in a pamphlet by J. B. Ward (1885) goes: Thomas
  2164.   Jefferson Beale and a party of adventurers accumulated a huge mass
  2165.   of treasure and buried it in Bedford County, Virginia, leaving
  2166.   three ciphers with an innkeeper; the ciphers describe the
  2167.   location, contents, and intended beneficiaries of the treasure.
  2168.   Ward gives a decryption of the second cipher (contents) called B2;
  2169.   it was encrypted as a book cipher using the initial letters of the
  2170.   Declaration of Independence (DOI) as key. B1 and B3 are unsolved;
  2171.   many documents have been tried as the key to B1.
  2172.  
  2173.   Aficionados can join a group that attempts to solve B1 by various
  2174.   means with an eye toward splitting the treasure:
  2175.  
  2176.   The Beale Cypher Association
  2177.   P.O. Box 975
  2178.   Beaver Falls, PA 15010
  2179.  
  2180.   You can get the ciphers from the rec.puzzles FAQL by including the
  2181.   line:
  2182.  
  2183.   send index
  2184.  
  2185.   in a message to netlib@peregrine.com and following the directions.
  2186.   (There are apparently several different versions of the cipher
  2187.   floating around. The correct version is based on the 1885 pamphlet,
  2188.   says John King <kingj@hpcc01.corp.hp.com>.)
  2189.  
  2190.   Some believe the story is a hoax. Kruh [KRU88] gives a long list of
  2191.   problems with the story. Gillogly [GIL80] decrypted B1 with the DOI
  2192.   and found some unexpected strings, including ABFDEFGHIIJKLMMNOHPP.
  2193.   Hammer (president of the Beale Cypher Association) agrees that this
  2194.   string couldn't appear by chance, but feels there must be an
  2195.   explanation; Gwyn (sci.crypt expert) is unimpressed with this
  2196.   string.
  2197.  
  2198. 9.5. What is the American Cryptogram Association, and how do I get in touch?
  2199.  
  2200.   The ACA is an organization devoted to cryptography, with an emphasis
  2201.   on cryptanalysis of systems that can be attacked either with
  2202.   pencil-and-paper or computers. Its organ ``The Cryptogram'' includes
  2203.   articles and challenge ciphers. Among the more than 50 cipher types in
  2204.   English and other languages are simple substitution, Playfair,
  2205.   Vigenere, bifid, Bazeries, grille, homophonic, and cryptarithm.
  2206.  
  2207.   Dues are $15 for one year (6 issues); more outside of North America;
  2208.   less for students under 18 and seniors. Subscriptions should be sent
  2209.   to ACA Treasurer, P.O. Box 198, Vernon Hills, IL 60061-0198.
  2210.  
  2211. 9.6. Is RSA patented?
  2212.  
  2213.   Yes. The patent number is 4,405,829, filed 12/14/77, granted 9/20/83.
  2214.   For further discussion of this patent, whether it should have been
  2215.   granted, algorithm patents in general, and related legal and moral
  2216.   issues, see comp.patents and misc.legal.computing. For information
  2217.   about the League for Programming Freedom see [FTPPF]. Note that one of
  2218.   the original purposes of comp.patents was to collect questions such as
  2219.   ``should RSA be patented?'', which often flooded sci.crypt and other
  2220.   technical newsgroups, into a more appropriate forum.
  2221.  
  2222. 9.7. What about the Voynich manuscript?
  2223.  
  2224.   The Voynich manuscript is an elaborately lettered and illustrated
  2225.   document, in a script never deciphered. It has been handed down for
  2226.   centuries by a line of art collectors and has uncertain origination.
  2227.   Much speculation and attention has been focused on its potential
  2228.   meaning.
  2229.  
  2230.   nelson@reed.edu (Nelson Minar) says there is a mailing list on the
  2231.   subject. The address to write to subscribe to the VMS mailing list
  2232.   is: <voynich-request@rand.org>
  2233.  
  2234.   the ftp archive is: rand.org:/pub/voynich
  2235.  
  2236.   There's all sorts of information about the manuscript itself, of
  2237.   course. A good bibliography can be found on the ftp site. [KAH67]
  2238.   gives a good introduction.
  2239.  
  2240.  
  2241. ------------------------------------------------------------------------
  2242. Date: 05-21-94                         Msg # 12460  
  2243.   To: ALL                              Conf: (2120) news.answers
  2244. From: CRYPT-COMMENTS@MATH.NCSU.        Stat: Public
  2245. Subj: Cryptography FAQ (10/10:         Read: Yes
  2246. ------------------------------------------------------------------------
  2247.  @FROM   :CRYPT-COMMENTS@MATH.NCSU.EDU                                 
  2248.  @SUBJECT:Cryptography FAQ (10/10: References)                         
  2249.  @PACKOUT:05-21-94                                                     
  2250. Message-ID: <cryptography-faq/part10_769514754@rtfm.mit.edu>
  2251. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers
  2252. talk.answers
  2253. Organization: The Crypt Cabal
  2254.  
  2255. Archive-name: cryptography-faq/part10
  2256. Last-modified: 94/03/17
  2257.  
  2258.  
  2259. This is the tenth of ten parts of the sci.crypt FAQ. The parts are
  2260. mostly independent, but you should read the first part before the rest.
  2261. We don't have the time to send out missing parts by mail, so don't ask.
  2262. Notes such as ``[KAH67]'' refer to the reference list in this part.
  2263.  
  2264. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  2265. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  2266. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  2267. sci.answers, and news.answers every 21 days.
  2268.  
  2269.  
  2270.  
  2271. Contents
  2272.  
  2273. 10.1. Books on history and classical methods
  2274. 10.2. Books on modern methods
  2275. 10.3. Survey articles
  2276. 10.4. Reference articles
  2277. 10.5. Journals, conference proceedings
  2278. 10.6. Other
  2279. 10.7. How may one obtain copies of FIPS and ANSI standards cited herein?
  2280. 10.8. Electronic sources
  2281. 10.9. RFCs (available from [FTPRF])
  2282. 10.10. Related newsgroups
  2283.  
  2284.  
  2285. 10.1. Books on history and classical methods
  2286.  
  2287.   [FRIE1] Lambros D. Callimahos, William F. Friedman, Military Cryptanalytics.
  2288.           Aegean Park Press, ?.
  2289.   [DEA85] Cipher A. Deavours & Louis Kruh, Machine Cryptography and
  2290.           Modern Cryptanalysis. Artech House, 610 Washington St.,
  2291.           Dedham, MA 02026, 1985.
  2292.   [FRIE2] William F. Friedman, Solving German Codes in World War I.
  2293.           Aegean Park Press, ?.
  2294.   [GAI44] H. Gaines, Cryptanalysis, a study of ciphers and their
  2295.           solution. Dover Publications, 1944.
  2296.   [HIN00] F.H.Hinsley, et al., British Intelligence in the Second
  2297.           World War. Cambridge University Press. (vol's 1, 2, 3a, 3b
  2298.           & 4, so far). XXX Years and authors, fix XXX
  2299.   [HOD83] Andrew Hodges, Alan Turing: The Enigma. Burnett Books
  2300.           Ltd., 1983
  2301.   [KAH91] David Kahn, Seizing the Enigma. Houghton Mifflin, 1991.
  2302.   [KAH67] D. Kahn, The Codebreakers. Macmillan Publishing, 1967.
  2303.           [history] [The abridged paperback edition left out most
  2304.           technical details; the original hardcover edition is
  2305.           recommended.]
  2306.   [KOZ84] W. Kozaczuk, Enigma. University Publications of America, 1984
  2307.   [KUL76] S. Kullback, Statistical Methods in Cryptanalysis. Aegean
  2308.           Park Press, 1976.
  2309.   [SIN66] A. Sinkov, Elementary Cryptanalysis. Math. Assoc. Am. 1966.
  2310.   [WEL82] Gordon Welchman, The Hut Six Story. McGraw-Hill, 1982.
  2311.   [YARDL] Herbert O. Yardley, The American Black Chamber. Aegean Park
  2312.           Press, ?.
  2313.  
  2314. 10.2. Books on modern methods
  2315.  
  2316.   [BEK82] H. Beker, F. Piper, Cipher Systems. Wiley, 1982.
  2317.   [BRA88] G. Brassard, Modern Cryptology: a tutorial.
  2318.           Spinger-Verlag, 1988.
  2319.   [DEN82] D. Denning, Cryptography and Data Security. Addison-Wesley
  2320.           Publishing Company, 1982.
  2321.   [KOB89] N. Koblitz, A course in number theory and cryptography.
  2322.           Springer-Verlag, 1987.
  2323.   [KON81] A. Konheim, Cryptography: a primer. Wiley, 1981.
  2324.   [MEY82] C. Meyer and S. Matyas, Cryptography: A new dimension in
  2325.           computer security. Wiley, 1982.
  2326.   [PAT87] Wayne Patterson, Mathematical Cryptology for Computer
  2327.           Scientists and Mathematicians. Rowman & Littlefield, 1987.
  2328.   [PFL89] C. Pfleeger, Security in Computing. Prentice-Hall, 1989.
  2329.   [PRI84] W. Price, D. Davies, Security for computer networks. Wiley, 1984. 
  2330.   [RUE86] R. Rueppel, Design and Analysis of Stream Ciphers.
  2331.           Springer-Verlag, 1986.
  2332.   [SAL90] A. Saloma, Public-key cryptography. Springer-Verlag, 1990.
  2333.   [SCH94] B. Schneier, Applied Cryptography. John Wiley & Sons, 1994.
  2334.    [errata avbl from schneier@chinet.com]
  2335.   [WEL88] D. Welsh, Codes and Cryptography. Claredon Press, 1988.
  2336.  
  2337. 10.3. Survey articles
  2338.  
  2339.   [ANG83] D. Angluin, D. Lichtenstein, Provable Security in Crypto-
  2340.           systems: a survey. Yale University, Department of Computer
  2341.           Science, #288, 1983.
  2342.   [BET90] T. Beth, Algorithm engineering for public key algorithms.
  2343.           IEEE Selected Areas of Communication, 1(4), 458--466,
  2344.           1990.
  2345.   [DAV83] M. Davio, J. Goethals, Elements of cryptology. in Secure
  2346.           Digital Communications, G. Longo ed., 1--57, 1983.
  2347.   [DIF79] W. Diffie, M. Hellman, Privacy and Authentication: An
  2348.           introduction to cryptography. IEEE proceedings, 67(3),
  2349.           397--427, 1979.
  2350.   [DIF88] W. Diffie, The first ten years of public key cryptography.
  2351.           IEEE proceedings, 76(5), 560--577, 1988.
  2352.   [FEI73] H. Feistel, Cryptography and Computer Privacy. Scientific 
  2353.           American, 228(5), 15--23, 1973.
  2354.   [FEI75] H. Feistel, H, W. Notz, J. Lynn Smith. Some cryptographic
  2355.           techniques for machine-to-machine data communications,
  2356.           IEEE IEEE proceedings, 63(11), 1545--1554, 1975.
  2357.   [HEL79] M. Hellman, The mathematics of public key cryptography.
  2358.           Scientific American, 130--139, 1979.
  2359.   [LAK83] S. Lakshmivarahan, Algorithms for public key
  2360.           cryptosystems. In Advances in Computers, M. Yovtis ed.,
  2361.           22, Academic Press, 45--108, 1983.
  2362.   [LEM79] A. Lempel, Cryptology in transition, Computing Surveys,
  2363.           11(4), 285--304, 1979.
  2364.   [MAS88] J. Massey, An introduction to contemporary cryptology, IEEE
  2365.           proceedings, 76(5), 533--549, 1988.
  2366.   [SIM91] G. Simmons (ed.), Contemporary Cryptology: the Science of
  2367.           Information Integrity. IEEE press, 1991.
  2368.  
  2369. 10.4. Reference articles
  2370.  
  2371.   [AND83] D. Andelman, J. Reeds, On the cryptanalysis of rotor and
  2372.           substitution-permutation networks. IEEE Trans. on Inform.
  2373.           Theory, 28(4), 578--584, 1982.
  2374.   [BEN87] John Bennett, Analysis of the Encryption Algorithm Used in
  2375.           the WordPerfect Word Processing Program. Cryptologia 11(4),
  2376.           206--210, 1987.
  2377.   [BER91] H. A. Bergen and W. J. Caelli, File Security in WordPerfect
  2378.           5.0. Cryptologia 15(1), 57--66, January 1991.
  2379.   [BIH91] E. Biham and A. Shamir, Differential cryptanalysis of
  2380.           DES-like cryptosystems. Journal of Cryptology, vol. 4, #1,
  2381.           3--72, 1991.
  2382.   [BI91a] E. Biham, A. Shamir, Differential cryptanalysis of Snefru,
  2383.           Khafre, REDOC-II, LOKI and LUCIFER. In Proceedings of CRYPTO
  2384.           '91, ed. by J. Feigenbaum, 156--171, 1992.
  2385.   [BOY89] J. Boyar, Inferring Sequences Produced by Pseudo-Random
  2386.           Number Generators. Journal of the ACM, 1989.
  2387.   [BRI86] E. Brickell, J. Moore, M. Purtill, Structure in the
  2388.           S-boxes of DES. In Proceedings of CRYPTO '86, A. M. Odlyzko
  2389.           ed., 3--8, 1987.
  2390.   [BRO89] L. Brown, A proposed design for an extended DES, Computer
  2391.           Security in the Computer Age. Elsevier Science Publishers
  2392.           B.V. (North Holland), IFIP, W. J. Caelli ed., 9--22, 1989.
  2393.   [BRO90] L. Brown, J. Pieprzyk, J. Seberry, LOKI - a cryptographic
  2394.           primitive for authentication and secrecy applications.
  2395.           In Proceedings of AUSTCRYPT 90, 229--236, 1990.
  2396.   [CAE90] H. Gustafson, E. Dawson, W. Caelli, Comparison of block
  2397.           ciphers. In Proceedings of AUSCRYPT '90, J. Seberry and J.
  2398.           Piepryzk eds., 208--220, 1990.
  2399.   [CAM93] K. W. Campbell, M. J. Wiener, Proof the DES is Not a Group.
  2400.           In Proceedings of CRYPTO '92, 1993.
  2401.   [CAR86] John Carrol and Steve Martin, The Automated Cryptanalysis
  2402.           of Substitution Ciphers. Cryptologia 10(4), 193--209, 1986.
  2403.   [CAR87] John Carrol and Lynda Robbins, Automated Cryptanalysis of
  2404.           Polyalphabetic Ciphers. Cryptologia 11(4), 193--205, 1987.
  2405.   [ELL88] Carl M. Ellison, A Solution of the Hebern Messages. Cryptologia,
  2406.           vol. XII, #3, 144-158, Jul 1988.
  2407.   [EVE83] S. Even, O. Goldreich, DES-like functions can generate the
  2408.           alternating group. IEEE Trans. on Inform. Theory, vol. 29,
  2409.           #6, 863--865, 1983.
  2410.   [GAR91] G. Garon, R. Outerbridge, DES watch: an examination of the
  2411.           sufficiency of the Data Encryption Standard for financial
  2412.           institutions in the 1990's. Cryptologia, vol. XV, #3,
  2413.           177--193, 1991.
  2414.   [GIL80] Gillogly, ?. Cryptologia 4(2), 1980.
  2415.   [GM82]  Shafi Goldwasser, Silvio Micali, Probabilistic Encryption and
  2416.           How To Play Mental Poker Keeping Secret All Partial Information.
  2417.           Proceedings of the Fourteenth Annual ACM Symposium on Theory of
  2418.           Computing, 1982.
  2419.   [HUM83] D. G. N. Hunter and A. R. McKenzie, Experiments with
  2420.           Relaxation Algorithms for Breaking Simple Substitution
  2421.           Ciphers. Computer Journal 26(1), 1983.
  2422.   [KAM78] J. Kam, G. Davida, A structured design of substitution-
  2423.           permutation encryption networks. IEEE Trans. Information
  2424.           Theory, 28(10), 747--753, 1978.
  2425.   [KIN78] P. Kinnucan, Data encryption gurus: Tuchman and Meyer.
  2426.           Cryptologia, vol. II #4, 371--XXX, 1978.
  2427.   [KIN92] King and Bahler, Probabilistic Relaxation in the
  2428.           Cryptanalysis of Simple Substitution Ciphers. Cryptologia
  2429.           16(3), 215--225, 1992.
  2430.   [KIN93] King and Bahler, An Algorithmic Solution of Sequential
  2431.           Homophonic Ciphers. Cryptologia 17(2), in press.
  2432.   [KOC87] Martin Kochanski, A Survey of Data Insecurity Packages.
  2433.           Cryptologia 11(1), 1--15, 1987.
  2434.   [KOC88] Martin Kochanski, Another Data Insecurity Package.
  2435.           Cryptologia 12(3), 165--177, 1988.
  2436.   [KRU88] Kruh, ?. Cryptologia 12(4), 1988.
  2437.   [LAI90] X. Lai, J. Massey, A proposal for a new block encryption 
  2438.           standard. EUROCRYPT 90, 389--404, 1990.
  2439.   [LUB88] C. Rackoff, M. Luby, How to construct psuedorandom
  2440.           permutations from psuedorandom functions. SIAM Journal of
  2441.           Computing, vol. 17, #2, 373--386, 1988.
  2442.   [LUC88] Michael Lucks, A Constraint Satisfaction Algorithm for the
  2443.           Automated Decryption of Simple Substitution Ciphers. In
  2444.           CRYPTO '88.
  2445.   [MAS88] J. Massey, An introduction to contemporary cryptology.
  2446.           IEEE proceedings, 76(5), 533--549, 1988.
  2447.   [ME91a] R. Merkle, Fast software encryption functions. In Proceedings
  2448.           of CRYPTO '90, Menezes and Vanstone ed., 476--501, 1991.
  2449.   [MEY78] C. Meyer, Ciphertext/plaintext and ciphertext/key
  2450.           dependence vs. number of rounds for the Data Encryption
  2451.           Standard. AFIPS Conference proceedings, 47, 1119--1126,
  2452.           1978.
  2453.   [NBS77] Data Encryption Standard. National Bureau of Standards,
  2454.           FIPS PUB 46, Washington, DC, January 1977.
  2455.   [PEL79] S. Peleg and A. Rosenfeld, Breaking Substitution Ciphers
  2456.           Using a Relaxation Algorithm. CACM 22(11), 598--605, 1979.
  2457.   [REE77] J. Reeds, `Cracking' a Random Number Generator.
  2458.           Cryptologia 1(1), 20--26, 1977.
  2459.   [REE84] J. A. Reeds and P. J. Weinberger, File Security and the UNIX
  2460.           Crypt Command. AT&T Bell Laboratories Technical Journal,
  2461.           Vol. 63 #8, part 2, 1673--1684, October, 1984.
  2462.   [SHA49] C. Shannon, Communication Theory of Secrecy Systems. Bell
  2463.           System Technical Journal 28(4), 656--715, 1949.
  2464.   [SHE88] B. Kaliski, R. Rivest, A. Sherman, Is the Data Encryption
  2465.           Standard a Group. Journal of Cryptology, vol. 1, #1,
  2466.           1--36, 1988.
  2467.   [SHI88] A. Shimizu, S. Miyaguchi, Fast data encipherment algorithm
  2468.           FEAL. EUROCRYPT '87, 267--278, 1988.
  2469.   [SHI92] K. Shirriff, C. Welch, A. Kinsman, Decoding a VCR Controller
  2470.           Code. Cryptologia 16(3), 227--234, 1992.
  2471.   [SOR84] A. Sorkin, LUCIFER: a cryptographic algorithm.
  2472.           Cryptologia, 8(1), 22--35, 1984.
  2473.   [SPI93] R. Spillman et al., Use of Genetic Algorithms in
  2474.           Cryptanalysis of Simple Substitution Ciphers. Cryptologia
  2475.           17(1), 31--44, 1993.
  2476.         
  2477. 10.5. Journals, conference proceedings
  2478.  
  2479.   CRYPTO
  2480.   Eurocrypt
  2481.   IEEE Transactions on Information Theory
  2482.   Cryptologia: a cryptology journal, quarterly since Jan 1977.
  2483.           Cryptologia; Rose-Hulman Institute of Technology; Terre Haute
  2484.           Indiana 47803 [general: systems, analysis, history, ...]
  2485.   Journal of Cryptology; International Association for Cryptologic
  2486.           Research; published by Springer Verlag (quarterly since
  2487.           1988).
  2488.   The Cryptogram (Journal of the American Cryptogram Association);
  2489.           18789 West Hickory Street; Mundelein, IL 60060; [primarily
  2490.           puzzle cryptograms of various sorts]
  2491.   Cryptosystems Journal, Published by Tony Patti, P.O. Box 188,
  2492.           Newtown PA, USA 18940-0188 or tony_s_patti@cup.portal.com.
  2493.           Publisher's comment: Includes complete cryptosystems with
  2494.           source and executable programs on diskettes. Tutorial. The
  2495.           typical cryptosystems supports multi-megabit keys and Galois
  2496.           Field arithmetic. Inexpensive hardware random number
  2497.           generator details.
  2498.   Computer and Communication Security Reviews, published by Ross Anderson.
  2499.           Sample issue available from various ftp sites, including
  2500.           black.ox.ac.uk. Editorial c/o rja14@cl.cam.ac.uk. Publisher's
  2501.           comment: We review all the conference proceedings in this field,
  2502.           including not just Crypto and Eurocrypt, but regional gatherings
  2503.           like Auscrypt and Chinacrypt. We also abstract over 50 journals,
  2504.           and cover computer security as well as cryptology, so readers can
  2505.           see the research trends in applications as well as theory.
  2506.   Infosecurity News, MIS Training Institute Press, Inc. 498 Concord Street
  2507.           Framingham MA 01701-2357. This trade journal is oriented toward 
  2508.           administrators and covers viruses, physical security, hackers, 
  2509.           and so on more than cryptology. Furthermore, most of the articles 
  2510.           are written by vendors and hence are biased.  Nevertheless, there 
  2511.           are occasionally some rather good cryptography articles.
  2512.  
  2513. 10.6. Other
  2514.  
  2515.   Address of note: Aegean Park Press, P.O. Box 2837, Laguna Hills, CA
  2516.   92654-0837. Answering machine at 714-586-8811.  Toll Free at 800 736-
  2517.   3587, and FAX at 714 586-8269.
  2518.  
  2519.   The ``Orange Book'' is DOD 5200.28-STD, published December 1985 as
  2520.   part of the ``rainbow book'' series. Write to Department of Defense,
  2521.   National Security Agency, ATTN: S332, 9800 Savage Road, Fort Meade, MD
  2522.   20755-6000, and ask for the Trusted Computer System Evaluation
  2523.   Criteria. Or call 301-766-8729.
  2524.  
  2525.   The ``Orange Book'' will eventually be replaced by the U.S. Federal 
  2526.   Criteria for Information Technology Security (FC) online at the NIST
  2527.   site [FTPNS], which also contains information on other various proposed 
  2528.   and active federal standards.
  2529.  
  2530.   [BAMFD] Bamford, The Puzzle Palace. Penguin Books, ?.
  2531.   [GOO83] I. J. Good, Good Thinking: the foundations of probability and
  2532.           its applications. University of Minnesota Press, 1983.
  2533.   [KNU81] D. E. Knuth, The Art of Computer Programming, volume 2:
  2534.           Seminumerical Algorithms. Addison-Wesley, 1981.
  2535.   [KUL68] Soloman Kullback, Information Theory and Statistics.
  2536.           Dover, 1968.
  2537.   [YAO88] A. Yao, Computational Information Theory. In Complexity in
  2538.           Information Theory, ed. by Abu-Mostafa, 1988.
  2539.  
  2540. 10.7. How may one obtain copies of FIPS and ANSI standards cited herein?
  2541.  
  2542.   Many textbooks on cryptography contain complete reprints of the FIPS
  2543.   standards, which are not copyrighted.
  2544.  
  2545.   The following standards may be ordered from the
  2546.       U.S. Department of Commerce, National Technical Information Service,
  2547.       Springfield, VA 22161.
  2548.  
  2549.       FIPS PUB 46-1 Data Encryption Standard  (this is DES)
  2550.       FIPS PUB 74   Guidelines for Implementing as Using the NBS DES
  2551.       FIPS PUB 81   DES Modes of Operation
  2552.       FIPS PUB 113  Computer Data Authentication (using DES)
  2553.  
  2554.   The following standards may be ordered from the
  2555.       American National Standards Institute Sales Office,
  2556.       1430 Broadway, New York, NY 10018.
  2557.       Phone 212.642.4900
  2558.  
  2559.       ANSI X3.92-1981  Data Encryption Algorithm (identical to FIPS 46-1)
  2560.       ANSI X3.106-1983 DEA Modes of Operation    (identical to FIPS 113)
  2561.  
  2562.   Notes:  Figure 3 in FIPS PUB 46-1 is in error, but figure 3 in X3.92-1981
  2563.       is correct. The text is correct in both publications.
  2564.  
  2565.  
  2566. 10.8. Electronic sources
  2567.  
  2568.   Anonymous ftp:
  2569.  
  2570.   [FTPAL] kampi.hut.fi:alo/des-dist.tar.Z
  2571.   [FTPBK] ftp.uu.net:bsd-sources/usr.bin/des/
  2572.   [FTPCB] ftp.uu.net:usenet/comp.sources.unix/volume10/cbw/
  2573.   [FTPCP] soda.berkely.edu:/pub/cypherpunks
  2574.   [FTPDF] ftp.funet.fi:pub/unix/security/destoo.tar.Z
  2575.   [FTPDQ] rsa.com:pub/faq/
  2576.   [FTPEY] ftp.psy.uq.oz.au:pub/DES/
  2577.   [FTPMD] rsa.com:?
  2578.   [FTPMR] ripem.msu.edu:pub/crypt/newdes.tar.Z
  2579.   [FTPNS] csrc.nist.gov:/bbs/nistpubs
  2580.   [FTPOB] ftp.3com.com:Orange-book
  2581.   [FTPPF] prep.ai.mit.edu:pub/lpf/
  2582.   [FTPPK] ucsd.edu:hamradio/packet/tcpip/crypto/des.tar.Z
  2583.   [FTPPX] ripem.msu.edu:pub/crypt/other/tran-and-prngxor.shar
  2584.   [FTPRF] nic.merit.edu:documents/rfc/
  2585.   [FTPSF] beta.xerox.com:pub/hash/
  2586.   [FTPSO] chalmers.se:pub/des/des.1.0.tar.Z
  2587.   [FTPTR] ripem.msu.edu:pub/crypt/other/tran-and-prngxor.shar
  2588.   [FTPUF] ftp.uu.net:usenet/comp.sources.unix/volume28/ufc-crypt/
  2589.   [FTPWP] garbo.uwasa.fi:pc/util/wppass2.zip
  2590.  
  2591. 10.9. RFCs (available from [FTPRF])
  2592.  
  2593.   [1424]  B. Kaliski, Privacy Enhancement for Internet Electronic Mail:
  2594.           Part IV: Key Certification and Related Services. RFC 1424,
  2595.           February 1993.
  2596.   [1423]  D. Balenson, Privacy Enhancement for Internet Electronic Mail:
  2597.           Part III: Algorithms, Modes, and Identifiers. RFC 1423,
  2598.           February 1993.
  2599.   [1422]  S. Kent, Privacy Enhancement for Internet Electronic Mail:
  2600.           Part II: Certificate-Based Key Management. RFC 1422, February
  2601.           1993.
  2602.   [1421]  J. Linn, Privacy Enhancement for Internet Electronic Mail:
  2603.           Part I: Message Encryption and Authentication Procedures. RFC
  2604.           1421, February 1993.
  2605.  
  2606. 10.10. Related newsgroups
  2607.  
  2608.   There are other newsgroups which a sci.crypt reader might want also to
  2609.   read. Some have their own FAQs as well.
  2610.  
  2611.   alt.privacy.clipper           Clipper, Capstone, Skipjack, Key Escrow
  2612.   alt.security                  general security discussions
  2613.   alt.security.index            index to alt.security
  2614.   alt.security.pgp              discussion of PGP
  2615.   alt.security.ripem            discussion of RIPEM
  2616.   alt.society.civil-liberty     general civil liberties, including privacy
  2617.   comp.compression              discussion of compression algorithms and code
  2618.   comp.org.eff.news             News reports from EFF
  2619.   comp.org.eff.talk             discussion of EFF related issues
  2620.   comp.patents                  discussion of S/W patents, including RSA
  2621.   comp.risks                    some mention of crypto and wiretapping
  2622.   comp.society.privacy          general privacy issues
  2623.   comp.security.announce        announcements of security holes
  2624.   misc.legal.computing          software patents, copyrights, computer laws
  2625.   sci.math                      general math discussion
  2626.  
  2627.